feat(2.1.x): update 2.1.x feature and braking changes

xiaoyi 2021-04-25 13:55:07 +08:00
parent 2ecbe6d5b1
commit e8bd17c618
6 changed files with 33 additions and 10 deletions

View File

@ -4,8 +4,29 @@
### Feature
* 新增篝火测试资格交验
```
Bootstrap.GetTestQualification(bool,tapError=>{}):
```
* TapDB 通过 TapConfig 进行自动初始化
* 支持性改动用于 TapTap.Friends
### Breaking changes
* 废弃 Bind 接口
* LoginType 删除 Apple、Guest 登陆方式
* TapConfig Refactor Constructor
```c#
//建议使用以下 TapConfig 构造方法进行初始化
var config = new TapConfig.TapConfigBuilder()
.ClientID("client_id")
.ClientSecrect("client_secret")
.RegionType(RegionType.CN)
.Builder();
Bootstrap.Init(config);
```
### Dependencies
* TapTap.Common v2.1.0

Binary file not shown.

Binary file not shown.

View File

@ -14,12 +14,14 @@
#import <TapCommonSDK/TapCommonSDK.h>
#define TapSDK @"TapSDK"
#define TapSDK_VERSION_NUMBER @"20100001"
#define TapSDK_VERSION @"2.1.0"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM (NSInteger, TapBootstrapLoginType) {
TapBootstrapLoginTypeTapTap = 0,
TapBootstrapLoginTypeApple,
TapBootstrapLoginTypeGuest
};
typedef NS_ENUM (NSInteger, TapBootstrapBindType) {
@ -49,15 +51,15 @@ typedef void (^TapUserDetailsHandler)(TapUserDetails *_Nullable userDetail, NSEr
/// @param delegate 回调
+ (void)registerUserStatusChangedDelegate:(id <TapUserStatusChangedDelegate>)delegate;
/// TapTap 登录
/// @param permissions 权限列表
+ (void)loginWithPermissions:(NSArray *_Nullable)permissions;
/// 登录
/// @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;
@ -73,6 +75,10 @@ typedef void (^TapUserDetailsHandler)(TapUserDetails *_Nullable userDetail, NSEr
/// 打开用户中心
+ (void)openUserCenter;
/// 获取用户是否有测试资格
/// @param handler 回调
+ (void)getTestQualification:(void (^)(BOOL isQualified, NSError *_Nullable error))handler;
/// 设定游戏倾向语言
/// @param lang TapLanguageType 0-自动 1-简中 2-英文
+ (void)setPreferredLanguage:(TapLanguageType)lang;

View File

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