1.配置
taptap官方说明:https://developer.taptap.cn/docs/sdk/start/get-ready/
1.引入taptapSDK:
LeanCloudObjc.framework
TapBootstrapSDK.framework
TapCommonSDK.framework
TapLoginSDK.framework
TapMomentResource.bundle
TapMomentSDK.framework
2.info.plist字段配置
在info.plist文件中新增字段:
RNTaptapClientId:开发者中心对应 Client ID
RNTaptapClientToken:开发者中心对应 Client Token
RNTaptapServerUrl:开发者中心 > 你的游戏 > 游戏服务 > 基本信息 > 域名配置 > API
详情请向运营咨询
另外新增配置
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>taptap</string>
<key>CFBundleURLSchemes</key>
<array>
<!-- 这里注意下,中括号需要去掉,最终是 Client ID 前拼接上 `tt` 的形式,例如:ttFwFdCxxxxxxxQDQwQN -->
<string>tt[clientID]</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>tapiosdk</string>
<string>tapsdk</string>
</array>
3.配置 openUrl:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [TDSHandleUrl handleOpenURL:url];
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
return [TDSHandleUrl handleOpenURL:url];
}
4.初始化
taptap SDK已经在内部由RNSDK初始化时一并初始化,不需要开发者做额外操作,开发者只需确认以上配置完整,参数正确即可
Last updated
Was this helpful?