feat(*): update namespace to TapTap.ModuleName

xiaoyi 2021-04-07 16:20:41 +08:00
commit 1215f6ce60
123 changed files with 1512 additions and 0 deletions

0
CHANGELOG.md Normal file
View File

3
CHANGELOG.md.meta Normal file
View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7388165be5344a9682382768c5fce466
timeCreated: 1616755935

3
Documentations.meta Normal file
View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 27a0d21b69c94375b4ad8359fe3f8a7c
timeCreated: 1616755924

68
Documentations/README.md Normal file
View File

@ -0,0 +1,68 @@
# 使用 TapTap.Bootstrap
## 1.命名空间
```c#
using TapBootstrapSDK;
```
## 2.接口描述
### 初始化
```c#
TapConfig config = new TapConfig(string clientId,bool isCN);
TapBootstrap.Init(config);
```
### 登陆
```c#
TapBootstrap.Login(LoginType loginType, string[] permissions);
```
### 设置语言
```c#
TapBootstrap.SetPreferLanguage(TapLanguage tapLanguage);
```
### 绑定TapTap账号
```c#
TapBootstrap.Bind(LoginType loginType, string[] permissions);
```
### 注册用户状态回调
```c#
TapBootstrap.RegisterUserStatusChangedListener(ITapUserStatusChangedListener listener);
```
### 注册登陆回调
```c#
TapBootstrap.RegisterLoginResultListener(ITapLoginResultListener listener);
```
### 获取用户信息
```c#
TapBootstrap.GetUser(Action<TapUser,TapError> action);
```
### 获取详细用户信息
```c#
TapBootstrap.GetDetailUser(Action<TapUserDetail, TapError> action);
```
### 获取AccessToken
```c#
TapBootstrap.GetDetailUser(Action<TapUserDetail, TapError> action);
```
### 登出
```c#
TapBootstrap.Logout();
```
### 打开用户中心
```c#
TapBootstrap.OpenUserCenter();
```

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 17ed6166c017a4fcda77ff618f2703db
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

3
Editor.meta Normal file
View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c26921c1db5141e28399200f4ccbfeb2
timeCreated: 1617120610

View File

@ -0,0 +1,78 @@
using System.IO;
using TapTap.Common.Editor;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using UnityEngine;
namespace TapTap.Bootstrap.Editor
{
public static class TapBootstrapIOSProcessor
{
// 添加标签unity导出工程后自动执行该函数
[PostProcessBuild(100)]
public static void OnPostprocessBuild(BuildTarget buildTarget, string path)
{
if (buildTarget != BuildTarget.iOS) return;
// 获得工程路径
var projPath = TapCommonCompile.GetProjPath(path);
var proj = TapCommonCompile.ParseProjPath(projPath);
var target = TapCommonCompile.GetUnityTarget(proj);
if (TapCommonCompile.CheckTarget(target))
{
Debug.LogError("Unity-iPhone is NUll");
return;
}
var parentFolder = Directory.GetParent(Application.dataPath).FullName;
var plistFile = TapFileHelper.RecursionFilterFile(parentFolder + "/Assets/Plugins/", "TDS-Info.plist");
if (!plistFile.Exists)
{
Debug.LogError("TapSDK Can't find TDS-Info.plist in Project/Assets/Plugins/!");
}
TapCommonCompile.HandlerPlist(path, plistFile.FullName);
HandlerAppleSignIn(proj, target, path, plistFile.FullName);
if (TapCommonCompile.HandlerIOSSetting(path,
Application.dataPath,
"TapBootstrapResource",
"com.tapsdk.bootstrap",
"Bootstrap",
new[] {"TapBootstrapResource.bundle"},
target, projPath, proj))
{
Debug.Log("TapBootstrap add Bundle Success!");
return;
}
Debug.LogError("TapBootstrap add Bundle Failed!");
}
private static void HandlerAppleSignIn(PBXProject proj, string target, string path, string plistPath)
{
var appleSignInEnable = TapCommonCompile.GetValueFromPlist(plistPath, "Apple_SignIn_Enable");
var appleSignInEnableKey = "com.apple.developer.applesignin";
if (string.IsNullOrEmpty(appleSignInEnable) || appleSignInEnable.Equals("false"))
{
Debug.LogError("TapSDK can't open Apple SignIn in XCode, Please Check Info.plist.");
return;
}
var entitleFilePath = $"{path}/Unity-iPhone.entitlements";
var tempEntitlements = new PlistDocument();
if (!((tempEntitlements.root[appleSignInEnableKey] = new PlistElementArray()) is PlistElementArray arrSigninWithApple))
{
Debug.LogError($"TapSDK can't find {appleSignInEnableKey}.");
return;
}
arrSigninWithApple.values.Add(new PlistElementString("Default"));
proj.AddCapability(target, PBXCapabilityType.SignInWithApple, entitleFilePath);
tempEntitlements.WriteToFile(entitleFilePath);
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c2dba369e41245f2872778730404259e
timeCreated: 1617120610

View File

@ -0,0 +1,16 @@
{
"name": "TapTap.Bootstrap.Editor",
"references": [
"TapTap.Common.Editor"
],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 73f667da7f25f432dbe7b984b79157cf
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Plugins.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 28697afd54414e35a13049bf184386cb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Plugins/Android.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b31af48adfc1f4876b1d0fe17cafff02
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 259349e722d9d438cbc2a722a58669e5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: 89a78afcee8734f64bc3fdfd98abb16d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 03acb073a9f88474581401ef1020c1c4
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b3d6c5154fb9d4319a2a32e6fde07f63
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Plugins/iOS.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1f2949e6f641e49c19093030af57acf4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 30f29b436e56a453d8ca2b037437207c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 4adafbe1c21554d3fa580588a6a91551
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
DefaultValueInitialized: true
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
{
"zh_hans":{
"logout_title":"退出登录",
"logout_content":"确定要退出当前账号吗?",
"logout_confirm":"确认",
"logout_cancel":"取消",
"copy_success":"复制成功",
"guest_name":"试玩用户",
"guest_id":"试玩 ID: %@",
"network_error_click_retry":"网络异常,点击重试",
"entry_moment":"动态",
"entry_friend":"好友"
},
"en":{
"logout_title":"Log out",
"logout_content":"Are you sure to log out of this account?",
"logout_confirm":"Confirm",
"logout_cancel":"Cancel",
"copy_success":"Copied",
"guest_name":"Guest Player",
"guest_id":"Guest ID: %@",
"network_error_click_retry":"Network error, click to retry",
"entry_moment":"Moments",
"entry_friend":"Friends"
}
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c9d4233f2c8a3447693f0a0aa28ecc72
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e2f84f0c206f74cdbbba7b91e8bc3fe6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9c0334d990dc44a4ca692a501d17261f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: cdc86dd3686724526b88c9041c48f9f7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8bf0b338ac2f94e279daf9b9dfa9007b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1159e8d0aa9894821a8f903c8097d2b9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7bc6a119bc20c4d5ea4d379770ff6a6d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0193cba9b653e45b79d7ef353204f87c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: cb0067ddf4ca9477a9ac3ea0b6e99069
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0b04ba122f6f5473ebe2b618cf221137
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b3cf7cfb3c53340f08911ac7a55c3dca
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2dc4d99d769554564be4d71b807aa8c3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c68534734ad4947028fed7a6d587c025
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8f3c17f13c0a64af2b88f09c6b5aab4f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 75bab1e152452460d9d52ca488e82ded
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e0bbb2069574c4114a52c5d69caa8213
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 35e74acff0e084465a5301d849934a09
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b4ddae784ac114cab9f570c9035e1a86
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 699abc74846374faea061a9048c1342a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e3ce00a8cbc8c442eb6ab7f801a32cb5
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,28 @@
fileFormatVersion: 2
guid: d0841683002f1434ea3c0f1e4019b0b6
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cfe9a0574a8fd417b9ea53d7e2f85b38
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
//
// AccessToken.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/20.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface AccessToken : NSObject
@property (nonatomic, copy) NSString *kid;
@property (nonatomic, copy) NSString *accessToken;
@property (nonatomic, copy) NSString *macAlgorithm;
@property (nonatomic, copy) NSString *tokenType;
@property (nonatomic, copy) NSString *macKey;
@property (nonatomic, assign) long expireIn;
- (instancetype)initWithJsonString:(NSString *)json;
- (NSString *)toJsonString;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 61473e60e12334525a6689a333a0c8d4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,85 @@
//
// TapBootstrap.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/18.
//
#import <Foundation/Foundation.h>
#import <TapBootstrapSDK/TapLoginResultDelegate.h>
#import <TapBootstrapSDK/TapUserStatusChangedDelegate.h>
#import <TapBootstrapSDK/TapUser.h>
#import <TapBootstrapSDK/TapUserDetails.h>
#import <TapBootstrapSDK/AccessToken.h>
#import <TapCommonSDK/TapCommonSDK.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM (NSInteger, TapBootstrapLoginType) {
TapBootstrapLoginTypeTapTap = 0,
TapBootstrapLoginTypeApple,
TapBootstrapLoginTypeGuest
};
typedef NS_ENUM (NSInteger, TapBootstrapBindType) {
TapBootstrapBindTypeTapTap
};
typedef void (^TapUserHandler)(TapUser *_Nullable userInfo, NSError *_Nullable error);
typedef void (^TapUserDetailsHandler)(TapUserDetails *_Nullable userDetail, NSError *_Nullable error);
@interface TapBootstrap : NSObject
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// 初始化
/// @param config 配置项
+ (void)initWithConfig:(TapConfig *)config;
/// 当前是否初始化
+ (BOOL)isInitialized;
/// 注册登录回调
/// @param delegate 回调
+ (void)registerLoginResultDelegate:(id <TapLoginResultDelegate>)delegate;
/// 注册用户状态变化回调
/// @param delegate 回调
+ (void)registerUserStatusChangedDelegate:(id <TapUserStatusChangedDelegate>)delegate;
/// 登录
/// @param type 登录类型
/// @param permissions 权限列表 (仅在taptap登录时需要)
+ (void)login:(TapBootstrapLoginType)type permissions:(NSArray *_Nullable)permissions;
/// 绑定 TapTap 账号
/// @param permissions TapTap 授权权限
+ (void)bind:(TapBootstrapBindType)type permissions:(NSArray *)permissions;
/// 获取用户基本信息
+ (void)getUser:(TapUserHandler)handler;
/// 获取用户详细信息
+ (void)getUserDetails:(TapUserDetailsHandler)handler;
/// 获取当前 token
+ (AccessToken *)getCurrentToken;
/// 退出登录
+ (void)logout;
/// 打开用户中心
+ (void)openUserCenter;
/// 设定游戏倾向语言
/// @param lang TapLanguageType 0-自动 1-简中 2-英文
+ (void)setPreferredLanguage:(TapLanguageType)lang;
/// 处理系统协议
/// @param url url
+ (BOOL)handleOpenURL:(NSURL *)url;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0a02a3c8a4f174f67b16ce72d31e7803
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
//
// TapBootstrapSDK.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/3/26.
//
#import <Foundation/Foundation.h>
//! Project version number for TapBootstrapSDK.
FOUNDATION_EXPORT double TapBootstrapSDKVersionNumber;
//! Project version string for TapBootstrapSDK.
FOUNDATION_EXPORT const unsigned char TapBootstrapSDKVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <TapBootstrapSDK/PublicHeader.h>
#import <TapBootstrapSDK/TapBootstrap.h>
#import <TapBootstrapSDK/TapSDKConstants.h>
#import <TapBootstrapSDK/AccessToken.h>
#import <TapBootstrapSDK/TapUser.h>
#import <TapBootstrapSDK/TapUserDetails.h>
#import <TapBootstrapSDK/TapUserCenterEntry.h>
#import <TapBootstrapSDK/TapLoginResultDelegate.h>
#import <TapBootstrapSDK/TapUserStatusChangedDelegate.h>

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: eb1761c8e43784a58a0ce866b0dd1e5d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,28 @@
//
// TapLoginResultDelegate.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/19.
//
#import <Foundation/Foundation.h>
@class AccessToken;
NS_ASSUME_NONNULL_BEGIN
@protocol TapLoginResultDelegate <NSObject>
/// 登录成功回调
/// @param token token对象
- (void)onLoginSuccess:(AccessToken *)token;
/// 登录取消
- (void)onLoginCancel;
/// 登录失败
/// @param error 失败原因
- (void)onLoginError:(NSError *)error;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ad80ac2afec0f42b7bfe4692ac80d23a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,27 @@
//
// TapSDKConstants.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/25.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#define TapSDK @"TapSDK"
#define TapSDK_VERSION_NUMBER @"2"
#define TapSDK_VERSION @"2.0.0"
FOUNDATION_EXTERN int const ERROR_CODE_UNDEFINED;
FOUNDATION_EXTERN int const ERROR_CODE_UNINITIALIZED;
FOUNDATION_EXTERN int const ERROR_CODE_BIND_CANCEL;
FOUNDATION_EXTERN int const ERROR_CODE_BIND_ERROR;
FOUNDATION_EXTERN int const ERROR_CODE_LOGOUT_INVALID_LOGIN_STATE;
FOUNDATION_EXTERN int const ERROR_CODE_LOGOUT_USER_CENER_LOGOUT;
FOUNDATION_EXTERN int const ERROR_CODE_LOGOUT_GAME;
FOUNDATION_EXTERN int const ERROR_CODE_LOGOUT_KICKED;
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b716debdfccf445ae8a84267cf750da0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
//
// TapUser.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/19.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface TapUser : NSObject
@property (nonatomic, copy) NSString *userId;
@property (nonatomic, copy, nullable) NSString *name;
@property (nonatomic, copy, nullable) NSString *avatar;
@property (nonatomic, copy, nullable) NSString *taptapUserId;
@property (nonatomic, assign) BOOL isGuest;
@property (nonatomic, assign) long gender;
- (NSString *)toJsonString;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7b294f5d35e0a4d41bc232d6b958ebce
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
//
// TapUserCenterEntry.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/23.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface TapUserCenterEntry : NSObject
@property (nonatomic, assign) BOOL isMomentEnabled;
@property (nonatomic, assign) BOOL isFriendEnabled;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6ca2874ba7672473f903108f17530475
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
//
// TapUserDetails.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/19.
//
#import <Foundation/Foundation.h>
#import <TapBootstrapSDK/TapUserCenterEntry.h>
NS_ASSUME_NONNULL_BEGIN
@interface TapUserDetails : NSObject
@property (nonatomic, copy) NSString *userId;
@property (nonatomic, copy, nullable) NSString *name;
@property (nonatomic, copy, nullable) NSString *avatar;
@property (nonatomic, assign) BOOL isGuest;
@property (nonatomic, assign) long gender;
@property (nonatomic, strong) TapUserCenterEntry *userCenterEntry;
- (NSString *)toJsonString;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3dce98196c5cf4d84a6acdd0b983bfcb
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
//
// TapUserStatusChangedDelegate.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/19.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol TapUserStatusChangedDelegate <NSObject>
/// 退出登录
/// @param error 如果是因为出错导致的退登,则返回错误信息
- (void)onLogout:(NSError *_Nullable)error;
/// 绑定回调
/// @param error 如果是因为出错导致的退登,则返回错误信息
@optional
- (void)onBind:(NSError *_Nullable)error;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9aa7a7bb727b9450c9c190ba202cb080
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 18e8bf815246941e780accbad0d3cab0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 58fca80acb0f343e587666a721ab99c8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,6 @@
framework module TapBootstrapSDK {
umbrella header "TapBootstrapSDK.h"
export *
module * { export * }
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 843ded79c37cd4f01a38350a7763535d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2b043b2f979ad4cf8835775eea533ec3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
//
// LoginApple.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/23.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface LoginApple : NSObject
+ (instancetype)shareInstance;
- (void)login;
+ (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 32e512034e2034dcb86c20defe486cfc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,18 @@
//
// LoginGuest.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/23.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface LoginGuest : NSObject
+ (void)login;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a1b8337c6b33c4091abf83ecd68b0ab8
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
//
// LoginTap.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/23.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface LoginTap : NSObject
+ (instancetype)shareInstance;
- (void)login:(NSArray *)permissions;
- (void)bind:(NSArray *)permissions;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 73bae0de4a5164442bc9db0271cf0f8d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,34 @@
//
// TDSAPI.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/19.
//
#import <Foundation/Foundation.h>
#import <TapCommonSDK/TDSNetExecutor.h>
NS_ASSUME_NONNULL_BEGIN
static NSString *const TDS_TAPTAP_LOGIN = @"/api/v1/authorization/taptap";
static NSString *const TDS_GUEST_LOGIN = @"/api/v1/authorization/device";
static NSString *const TDS_APPLE_LOGIN = @"/api/v1/authorization/apple";
static NSString *const TDS_TAPTAP_BIND = @"/api/v1/authorization/taptap/bind";
static NSString *const TDS_USER_INFO = @"/api/v1/user/info";
static NSString *const TDS_USER_DETAIL = @"/api/v1/user/detail";
static NSString *const TDS_TOKEN_REFRESH = @"/api/v1/token";
static NSString *const TDS_FRIEND_USER_INFO_MULTI = @"/api/v1/user/multi";
@interface TDSAPI : NSObject
+ (instancetype)sharedInstance;
- (TDSNetExecutor *)doWithRequest:(TDSNetRequestModel *)request;
- (NSString *)getXUAString;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dea88930f52054b93bd25d39ac37fbe1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
//
// TDSLogoutConfirmView.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/3/1.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface TDSLogoutConfirmView : NSObject
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 42fb9bb1de8f841f79ca7073cd5a140f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,41 @@
//
// TDSNetManager.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/23.
//
#import <Foundation/Foundation.h>
#import <TapBootstrapSDK/TapUser.h>
#import <TapBootstrapSDK/TapUserDetails.h>
#import <TapBootstrapSDK/TDSUserInfoList.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^TDSInnerSimpleHandler)(NSError *_Nullable error);
typedef void (^TDSInnerUserInfoHandler)(TapUser *_Nullable userInfo, NSError *_Nullable error);
typedef void (^TDSInnerUserDetailHandler)(TapUserDetails *_Nullable userDetail, NSError *_Nullable error);
typedef void (^TDSInnerMultiUserInfoHandler)(TDSUserInfoList *_Nullable userList, NSError *_Nullable error);
@interface TDSNetManager : NSObject
+ (void)refreshToken;
#pragma mark - handle bind taptap
+ (void)handleTapTapBind:(NSDictionary *_Nullable)args error:(NSError *_Nullable)error;
+ (void)handleThirdLoginSuccess:(NSDictionary *_Nullable)args type:(int)loginType;
+ (void)handleThirdLoginCancel;
+ (void)handleThirdLoginFail:(NSError *)error;
+ (void)getUserInfo:(TDSInnerUserInfoHandler)handler;
+ (void)getUserDetail:(TDSInnerUserDetailHandler)handler;
+ (void)getUserInfoMulti:(NSArray *)userIdArray
handler:(TDSInnerMultiUserInfoHandler)handler;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ef1da092d2ebe4e958bc289d8e917498
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
//
// TDSUCEntryCell.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/3/12.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface TDSUCEntryCell : UITableViewCell
- (void)setTitleText:(NSString *)title icon:(UIImage *)image needSeparator:(BOOL)needSeparator;
@end
NS_ASSUME_NONNULL_END

Some files were not shown because too many files have changed in this diff Show More