style(*): tapdb scene

zhangwenyan 2021-04-28 15:36:05 +08:00
commit 2d286de436
7 changed files with 29 additions and 34 deletions

View File

@ -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")
.ClientSecret("client_secret")
.RegionType(RegionType.CN)
.TapDBConfig("channel", "gameVersion")
.Builder();
Bootstrap.Init(config);
TapBootstrap.Init(config);
```
### Dependencies

View File

@ -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);
```

View File

@ -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.

View File

@ -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);