feat (bootstrap) : update TapConfig constructor func
docs : update doc
parent
e8bd17c618
commit
f592c8cdfe
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -4,27 +4,28 @@
|
|||
|
||||
### Feature
|
||||
|
||||
* 新增篝火测试资格交验
|
||||
* 新增篝火测试资格校验
|
||||
```
|
||||
Bootstrap.GetTestQualification(bool,tapError=>{}):
|
||||
Bootstrap.GetTestQualification((bool, error)=>{ }):
|
||||
```
|
||||
* TapDB 通过 TapConfig 进行自动初始化
|
||||
* 支持性改动用于 TapTap.Friends
|
||||
|
||||
### Breaking changes
|
||||
|
||||
* 废弃 Bind 接口
|
||||
* LoginType 删除 Apple、Guest 登陆方式
|
||||
* TDS-Info.plist 删除 Apple_SignIn_Enable 配置
|
||||
* 废弃 Bind 接口
|
||||
* TapConfig Refactor Constructor
|
||||
```c#
|
||||
//建议使用以下 TapConfig 构造方法进行初始化
|
||||
var config = new TapConfig.TapConfigBuilder()
|
||||
.ClientID("client_id")
|
||||
.ClientSecrect("client_secret")
|
||||
.RegionType(RegionType.CN)
|
||||
.Builder();
|
||||
|
||||
Bootstrap.Init(config);
|
||||
.ClientID("client_id")
|
||||
.ClientSecret("client_secret")
|
||||
.RegionType(RegionType.CN)
|
||||
.TapDBConfig("channel", "gameVersion")
|
||||
.Builder();
|
||||
TapBootstrap.Init(config);
|
||||
```
|
||||
|
||||
### Dependencies
|
||||
|
|
|
@ -16,7 +16,13 @@ using TapTap.Bootstrap;
|
|||
### 初始化
|
||||
|
||||
```c#
|
||||
TapConfig config = new TapConfig(string clientId,bool isCN);
|
||||
var config = new TapConfig.TapConfigBuilder()
|
||||
.ClientID("client_id")
|
||||
.ClientSecret("client_secret")
|
||||
.RegionType(RegionType.CN)
|
||||
.TapDBConfig("channel", "gameVersion")
|
||||
.Builder();
|
||||
|
||||
TapBootstrap.Init(config);
|
||||
```
|
||||
|
||||
|
|
|
@ -36,8 +36,6 @@ namespace TapTap.Bootstrap.Editor
|
|||
|
||||
TapCommonCompile.HandlerPlist(path, plistFile.FullName);
|
||||
|
||||
HandlerAppleSignIn(proj, target, path, plistFile.FullName);
|
||||
|
||||
if (TapCommonCompile.HandlerIOSSetting(path,
|
||||
Application.dataPath,
|
||||
"TapBootstrapResource",
|
||||
|
@ -53,26 +51,5 @@ namespace TapTap.Bootstrap.Editor
|
|||
Debug.LogWarning("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.LogWarning("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.LogWarning($"TapSDK can't find {appleSignInEnableKey}.");
|
||||
return;
|
||||
}
|
||||
arrSigninWithApple.values.Add(new PlistElementString("Default"));
|
||||
proj.AddCapability(target, PBXCapabilityType.SignInWithApple, entitleFilePath);
|
||||
tempEntitlements.WriteToFile(entitleFilePath);
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
13
README.md
13
README.md
|
@ -16,7 +16,13 @@ using TapTap.Bootstrap;
|
|||
### 初始化
|
||||
|
||||
```c#
|
||||
TapConfig config = new TapConfig(string clientId,bool isCN);
|
||||
var config = new TapConfig.TapConfigBuilder()
|
||||
.ClientID("client_id")
|
||||
.ClientSecret("client_secret")
|
||||
.RegionType(RegionType.CN)
|
||||
.TapDBConfig("channel", "gameVersion")
|
||||
.Builder();
|
||||
|
||||
TapBootstrap.Init(config);
|
||||
```
|
||||
|
||||
|
@ -57,6 +63,11 @@ TapBootstrap.GetUser(Action<TapUser,TapError> action);
|
|||
TapBootstrap.GetDetailUser(Action<TapUserDetail, TapError> action);
|
||||
```
|
||||
|
||||
### 篝火测试资格
|
||||
```c#
|
||||
TapBootstrap.GetTestQualification(Action<bool,TapError> action);
|
||||
```
|
||||
|
||||
### 获取AccessToken
|
||||
```c#
|
||||
TapBootstrap.GetDetailUser(Action<TapUserDetail, TapError> action);
|
||||
|
|
Loading…
Reference in New Issue