feat: update binary

xiaoyi 2021-06-04 14:13:05 +08:00
parent da9f828ee4
commit 20165bfdb6
36 changed files with 13 additions and 518 deletions

View File

@ -14,12 +14,14 @@
#import <TapCommonSDK/TapCommonSDK.h> #import <TapCommonSDK/TapCommonSDK.h>
#define TapSDK @"TapSDK"
#define TapSDK_VERSION_NUMBER @"20103001"
#define TapSDK_VERSION @"2.1.3"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM (NSInteger, TapBootstrapLoginType) { typedef NS_ENUM (NSInteger, TapBootstrapLoginType) {
TapBootstrapLoginTypeTapTap = 0, TapBootstrapLoginTypeTapTap = 0,
TapBootstrapLoginTypeApple,
TapBootstrapLoginTypeGuest
}; };
typedef NS_ENUM (NSInteger, TapBootstrapBindType) { typedef NS_ENUM (NSInteger, TapBootstrapBindType) {
@ -49,15 +51,15 @@ typedef void (^TapUserDetailsHandler)(TapUserDetails *_Nullable userDetail, NSEr
/// @param delegate 回调 /// @param delegate 回调
+ (void)registerUserStatusChangedDelegate:(id <TapUserStatusChangedDelegate>)delegate; + (void)registerUserStatusChangedDelegate:(id <TapUserStatusChangedDelegate>)delegate;
/// TapTap 登录
/// @param permissions 权限列表
+ (void)loginWithPermissions:(NSArray *_Nullable)permissions;
/// 登录 /// 登录
/// @param type 登录类型 /// @param type 登录类型
/// @param permissions 权限列表 (仅在taptap登录时需要) /// @param permissions 权限列表 (仅在taptap登录时需要)
+ (void)login:(TapBootstrapLoginType)type permissions:(NSArray *_Nullable)permissions; + (void)login:(TapBootstrapLoginType)type permissions:(NSArray *_Nullable)permissions;
/// 绑定 TapTap 账号
/// @param permissions TapTap 授权权限
+ (void)bind:(TapBootstrapBindType)type permissions:(NSArray *)permissions;
/// 获取用户基本信息 /// 获取用户基本信息
+ (void)getUser:(TapUserHandler)handler; + (void)getUser:(TapUserHandler)handler;
@ -70,8 +72,9 @@ typedef void (^TapUserDetailsHandler)(TapUserDetails *_Nullable userDetail, NSEr
/// 退出登录 /// 退出登录
+ (void)logout; + (void)logout;
/// 打开用户中心 /// 获取用户是否有测试资格
+ (void)openUserCenter; /// @param handler 回调
+ (void)getTestQualification:(void (^)(BOOL isQualified, NSError *_Nullable error))handler;
/// 设定游戏倾向语言 /// 设定游戏倾向语言
/// @param lang TapLanguageType 0-自动 1-简中 2-英文 /// @param lang TapLanguageType 0-自动 1-简中 2-英文

View File

@ -9,10 +9,6 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
#define TapSDK @"TapSDK"
#define TapSDK_VERSION_NUMBER @"1"
#define TapSDK_VERSION @"2.0.0"
FOUNDATION_EXTERN int const ERROR_CODE_UNDEFINED; FOUNDATION_EXTERN int const ERROR_CODE_UNDEFINED;
FOUNDATION_EXTERN int const ERROR_CODE_UNINITIALIZED; FOUNDATION_EXTERN int const ERROR_CODE_UNINITIALIZED;

View File

@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL isGuest; @property (nonatomic, assign) BOOL isGuest;
@property (nonatomic, assign) long gender; @property (nonatomic, assign) long gender;
- (instancetype)initWithJsonString:(NSString *)json;
- (NSString *)toJsonString; - (NSString *)toJsonString;
@end @end

View File

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

View File

@ -1,23 +0,0 @@
//
// 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

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

View File

@ -1,18 +0,0 @@
//
// 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

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

View File

@ -1,21 +0,0 @@
//
// 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

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

View File

@ -1,34 +0,0 @@
//
// 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

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

View File

@ -1,16 +0,0 @@
//
// 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

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

View File

@ -1,41 +0,0 @@
//
// 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

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

View File

@ -1,17 +0,0 @@
//
// 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

View File

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

View File

@ -1,19 +0,0 @@
//
// TDSUCEntryListView.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/3/11.
//
#import <UIKit/UIKit.h>
#import "TapUserDetails.h"
NS_ASSUME_NONNULL_BEGIN
@interface TDSUCEntryListView : UIView
@property (nonatomic, copy) void (^ entryDicClickBlock)(NSString *type);
- (void)loadData:(NSArray *)dataSource;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@ -1,19 +0,0 @@
//
// TDSUCHeadView.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/3/11.
//
#import <UIKit/UIKit.h>
#import "TapUserDetails.h"
NS_ASSUME_NONNULL_BEGIN
@interface TDSUCHeadView : UIView
@property (nonatomic, copy) void (^ copyIdBlock)(NSString *text);
- (void)loadData:(TapUserDetails *)userDetail;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@ -1,28 +0,0 @@
//
// TDSUIManager.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/3/1.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
extern NSString * const TDSUCEntryTypeMoment;
extern NSString * const TDSUCEntryTypeFriend;
@interface TDSUIManager : NSObject
+ (instancetype)sharedManager;
+ (void)showUserCenter;
+ (UIImage *)getImageFromBundle:(NSString *)name;
+ (NSString *)getTranslatedString:(NSString *)key;
- (void)logout;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@ -1,25 +0,0 @@
//
// TDSUserCenterView.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/3/1.
//
#import <UIKit/UIKit.h>
#import "TapUserDetails.h"
NS_ASSUME_NONNULL_BEGIN
@protocol TDSUserCenterProtocol <NSObject>
- (void)onReloadData;
- (void)onClose;
@end
@interface TDSUserCenterView : UIView
@property (nonatomic, weak) id<TDSUserCenterProtocol> delegate;
- (void)loadData:(TapUserDetails *)userDetail;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@ -1,17 +0,0 @@
//
// TDSUserInfoList.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/3/12.
//
#import <Foundation/Foundation.h>
#import "TapUser.h"
NS_ASSUME_NONNULL_BEGIN
@interface TDSUserInfoList : NSObject
@property (nonatomic) NSMutableArray<TapUser *> *list;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@ -1,37 +0,0 @@
//
// TapBootstrapService.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/24.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^ServiceCallback)(NSString *result);
@interface TapBootstrapService : NSObject
+ (void)registerLoginResultListener:(ServiceCallback)callback;
+ (void)registerUserStatusChangedListener:(ServiceCallback)callback;
+ (void)clientID:(NSString *)clientID regionType:(NSNumber *)isCN;
+ (void)login:(NSNumber *)type permissions:(NSArray *_Nullable)permissions;
+ (void)bind:(NSNumber *)type permissions:(NSArray *_Nullable)permissions;
+ (void)getUser:(ServiceCallback)callback;
+ (void)getUserDetails:(ServiceCallback)callback;
+ (void)getCurrentToken:(ServiceCallback)callback;
+ (void)logout;
+ (void)openUserCenter;
+ (void)preferredLanguage:(NSNumber *)language;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@ -1,52 +0,0 @@
//
// TapSDKImpl.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/23.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <TapBootstrapSDK/TapLoginResultDelegate.h>
#import <TapBootstrapSDK/TapUserStatusChangedDelegate.h>
#import <TapBootstrapSDK/TDSNetManager.h>
#import <TapBootstrapSDK/AccessToken.h>
#import <TapCommonSDK/TapCommonSDK.h>
NS_ASSUME_NONNULL_BEGIN
@interface TapSDKImpl : NSObject
@property (nonatomic, weak) id<TapLoginResultDelegate>loginResultDelegate;
@property (nonatomic, weak) id<TapUserStatusChangedDelegate>userStatusChangeDelegate;
@property (nonatomic, strong) TapConfig *config;
@property (nonatomic, copy) NSDictionary *defaultQueries;
+ (instancetype)shareInstance;
+ (void)initWithSDKConfig:(TapConfig *)config;
+ (void)refreshToken;
+ (void)loginByTap:(NSArray *)permissions;
+ (void)bindWithTapTap:(NSArray *)permissions;
+ (void)loginByGuest;
+ (void)loginByApple;
+ (void)getUserInfo:(TDSInnerUserInfoHandler)handler;
+ (void)getUserDetail:(TDSInnerUserDetailHandler)handler;
+ (AccessToken *)currentToken;
+ (void)logout:(NSError *_Nullable)error;
+ (BOOL)handleOpenURL:(NSURL *)url;
+ (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@ -1,26 +0,0 @@
//
// TokenManager.h
// TapBootstrapSDK
//
// Created by Bottle K on 2021/2/20.
//
#import <Foundation/Foundation.h>
#import "AccessToken.h"
NS_ASSUME_NONNULL_BEGIN
@interface TokenManager : NSObject
@property (nonatomic, strong, nullable) AccessToken *currentToken;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)shareInstance;
- (void)setToken:(AccessToken *)token;
- (void)logout;
@end
NS_ASSUME_NONNULL_END

View File

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