commit 1215f6ce60b976d12bd6e88ef1445109ffc8db11 Author: xiaoyi Date: Wed Apr 7 16:20:41 2021 +0800 feat(*): update namespace to TapTap.ModuleName diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/CHANGELOG.md.meta b/CHANGELOG.md.meta new file mode 100644 index 0000000..419383c --- /dev/null +++ b/CHANGELOG.md.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7388165be5344a9682382768c5fce466 +timeCreated: 1616755935 \ No newline at end of file diff --git a/Documentations.meta b/Documentations.meta new file mode 100644 index 0000000..1aa55ca --- /dev/null +++ b/Documentations.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 27a0d21b69c94375b4ad8359fe3f8a7c +timeCreated: 1616755924 \ No newline at end of file diff --git a/Documentations/README.md b/Documentations/README.md new file mode 100644 index 0000000..fc15282 --- /dev/null +++ b/Documentations/README.md @@ -0,0 +1,68 @@ +# 使用 TapTap.Bootstrap + +## 1.命名空间 + +```c# +using TapBootstrapSDK; +``` + +## 2.接口描述 + +### 初始化 + +```c# +TapConfig config = new TapConfig(string clientId,bool isCN); +TapBootstrap.Init(config); +``` + +### 登陆 + +```c# +TapBootstrap.Login(LoginType loginType, string[] permissions); +``` + +### 设置语言 +```c# +TapBootstrap.SetPreferLanguage(TapLanguage tapLanguage); +``` + +### 绑定TapTap账号 +```c# +TapBootstrap.Bind(LoginType loginType, string[] permissions); +``` + +### 注册用户状态回调 + +```c# +TapBootstrap.RegisterUserStatusChangedListener(ITapUserStatusChangedListener listener); +``` + +### 注册登陆回调 +```c# +TapBootstrap.RegisterLoginResultListener(ITapLoginResultListener listener); +``` + +### 获取用户信息 +```c# +TapBootstrap.GetUser(Action action); +``` + +### 获取详细用户信息 +```c# +TapBootstrap.GetDetailUser(Action action); +``` + +### 获取AccessToken +```c# +TapBootstrap.GetDetailUser(Action action); +``` + +### 登出 +```c# +TapBootstrap.Logout(); +``` + +### 打开用户中心 +```c# +TapBootstrap.OpenUserCenter(); +``` \ No newline at end of file diff --git a/Documentations/README.md.meta b/Documentations/README.md.meta new file mode 100644 index 0000000..125a6de --- /dev/null +++ b/Documentations/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 17ed6166c017a4fcda77ff618f2703db +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor.meta b/Editor.meta new file mode 100644 index 0000000..6b655ad --- /dev/null +++ b/Editor.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c26921c1db5141e28399200f4ccbfeb2 +timeCreated: 1617120610 \ No newline at end of file diff --git a/Editor/TapBootstrapIOSProcessor.cs b/Editor/TapBootstrapIOSProcessor.cs new file mode 100644 index 0000000..d4418f9 --- /dev/null +++ b/Editor/TapBootstrapIOSProcessor.cs @@ -0,0 +1,78 @@ +using System.IO; +using TapTap.Common.Editor; +using UnityEditor; +using UnityEditor.Callbacks; +using UnityEditor.iOS.Xcode; +using UnityEngine; + +namespace TapTap.Bootstrap.Editor +{ + public static class TapBootstrapIOSProcessor + { + // 添加标签,unity导出工程后自动执行该函数 + [PostProcessBuild(100)] + public static void OnPostprocessBuild(BuildTarget buildTarget, string path) + { + if (buildTarget != BuildTarget.iOS) return; + // 获得工程路径 + var projPath = TapCommonCompile.GetProjPath(path); + var proj = TapCommonCompile.ParseProjPath(projPath); + var target = TapCommonCompile.GetUnityTarget(proj); + + if (TapCommonCompile.CheckTarget(target)) + { + Debug.LogError("Unity-iPhone is NUll"); + return; + } + + var parentFolder = Directory.GetParent(Application.dataPath).FullName; + + var plistFile = TapFileHelper.RecursionFilterFile(parentFolder + "/Assets/Plugins/", "TDS-Info.plist"); + + if (!plistFile.Exists) + { + Debug.LogError("TapSDK Can't find TDS-Info.plist in Project/Assets/Plugins/!"); + } + + TapCommonCompile.HandlerPlist(path, plistFile.FullName); + + HandlerAppleSignIn(proj, target, path, plistFile.FullName); + + if (TapCommonCompile.HandlerIOSSetting(path, + Application.dataPath, + "TapBootstrapResource", + "com.tapsdk.bootstrap", + "Bootstrap", + new[] {"TapBootstrapResource.bundle"}, + target, projPath, proj)) + { + Debug.Log("TapBootstrap add Bundle Success!"); + return; + } + + Debug.LogError("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.LogError("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.LogError($"TapSDK can't find {appleSignInEnableKey}."); + return; + } + arrSigninWithApple.values.Add(new PlistElementString("Default")); + proj.AddCapability(target, PBXCapabilityType.SignInWithApple, entitleFilePath); + tempEntitlements.WriteToFile(entitleFilePath); + } + } +} \ No newline at end of file diff --git a/Editor/TapBootstrapIOSProcessor.cs.meta b/Editor/TapBootstrapIOSProcessor.cs.meta new file mode 100644 index 0000000..81c15e6 --- /dev/null +++ b/Editor/TapBootstrapIOSProcessor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c2dba369e41245f2872778730404259e +timeCreated: 1617120610 \ No newline at end of file diff --git a/Editor/TapTap.Bootstrap.Editor.asmdef b/Editor/TapTap.Bootstrap.Editor.asmdef new file mode 100644 index 0000000..dc95af2 --- /dev/null +++ b/Editor/TapTap.Bootstrap.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "TapTap.Bootstrap.Editor", + "references": [ + "TapTap.Common.Editor" + ], + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [] +} \ No newline at end of file diff --git a/Editor/TapTap.Bootstrap.Editor.asmdef.meta b/Editor/TapTap.Bootstrap.Editor.asmdef.meta new file mode 100644 index 0000000..43aab27 --- /dev/null +++ b/Editor/TapTap.Bootstrap.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 73f667da7f25f432dbe7b984b79157cf +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins.meta b/Plugins.meta new file mode 100644 index 0000000..1cae573 --- /dev/null +++ b/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 28697afd54414e35a13049bf184386cb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Android.meta b/Plugins/Android.meta new file mode 100644 index 0000000..de125c6 --- /dev/null +++ b/Plugins/Android.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b31af48adfc1f4876b1d0fe17cafff02 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Android/libs.meta b/Plugins/Android/libs.meta new file mode 100644 index 0000000..d961a59 --- /dev/null +++ b/Plugins/Android/libs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 259349e722d9d438cbc2a722a58669e5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Android/libs/TapBootstrap_2.0.0.aar b/Plugins/Android/libs/TapBootstrap_2.0.0.aar new file mode 100644 index 0000000..55d686a Binary files /dev/null and b/Plugins/Android/libs/TapBootstrap_2.0.0.aar differ diff --git a/Plugins/Android/libs/TapBootstrap_2.0.0.aar.meta b/Plugins/Android/libs/TapBootstrap_2.0.0.aar.meta new file mode 100644 index 0000000..06ccccb --- /dev/null +++ b/Plugins/Android/libs/TapBootstrap_2.0.0.aar.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: 89a78afcee8734f64bc3fdfd98abb16d +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/TapTap.Bootstrap.dll b/Plugins/TapTap.Bootstrap.dll new file mode 100644 index 0000000..41b4292 Binary files /dev/null and b/Plugins/TapTap.Bootstrap.dll differ diff --git a/Plugins/TapTap.Bootstrap.dll.meta b/Plugins/TapTap.Bootstrap.dll.meta new file mode 100644 index 0000000..6dcd382 --- /dev/null +++ b/Plugins/TapTap.Bootstrap.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 03acb073a9f88474581401ef1020c1c4 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/TapTap.Bootstrap.pdb b/Plugins/TapTap.Bootstrap.pdb new file mode 100644 index 0000000..0c78767 Binary files /dev/null and b/Plugins/TapTap.Bootstrap.pdb differ diff --git a/Plugins/TapTap.Bootstrap.pdb.meta b/Plugins/TapTap.Bootstrap.pdb.meta new file mode 100644 index 0000000..1456e1e --- /dev/null +++ b/Plugins/TapTap.Bootstrap.pdb.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b3d6c5154fb9d4319a2a32e6fde07f63 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS.meta b/Plugins/iOS.meta new file mode 100644 index 0000000..2c0eab9 --- /dev/null +++ b/Plugins/iOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1f2949e6f641e49c19093030af57acf4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource.meta b/Plugins/iOS/Resource.meta new file mode 100644 index 0000000..b632f8e --- /dev/null +++ b/Plugins/iOS/Resource.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30f29b436e56a453d8ca2b037437207c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle.meta new file mode 100644 index 0000000..fd8f53e --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 4adafbe1c21554d3fa580588a6a91551 +folderAsset: yes +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/TapBootstrapLanguage.json b/Plugins/iOS/Resource/TapBootstrapResource.bundle/TapBootstrapLanguage.json new file mode 100644 index 0000000..5d5d571 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/TapBootstrapLanguage.json @@ -0,0 +1,26 @@ +{ + "zh_hans":{ + "logout_title":"退出登录", + "logout_content":"确定要退出当前账号吗?", + "logout_confirm":"确认", + "logout_cancel":"取消", + "copy_success":"复制成功", + "guest_name":"试玩用户", + "guest_id":"试玩 ID: %@", + "network_error_click_retry":"网络异常,点击重试", + "entry_moment":"动态", + "entry_friend":"好友" + }, + "en":{ + "logout_title":"Log out", + "logout_content":"Are you sure to log out of this account?", + "logout_confirm":"Confirm", + "logout_cancel":"Cancel", + "copy_success":"Copied", + "guest_name":"Guest Player", + "guest_id":"Guest ID: %@", + "network_error_click_retry":"Network error, click to retry", + "entry_moment":"Moments", + "entry_friend":"Friends" + } +} diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/TapBootstrapLanguage.json.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/TapBootstrapLanguage.json.meta new file mode 100644 index 0000000..0decdd3 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/TapBootstrapLanguage.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c9d4233f2c8a3447693f0a0aa28ecc72 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images.meta new file mode 100644 index 0000000..d50d96d --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e2f84f0c206f74cdbbba7b91e8bc3fe6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@2x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@2x.png new file mode 100644 index 0000000..7282854 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@2x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@2x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@2x.png.meta new file mode 100644 index 0000000..62b390f --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9c0334d990dc44a4ca692a501d17261f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@3x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@3x.png new file mode 100644 index 0000000..f91df78 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@3x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@3x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@3x.png.meta new file mode 100644 index 0000000..fd66673 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_avatar@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cdc86dd3686724526b88c9041c48f9f7 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@2x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@2x.png new file mode 100644 index 0000000..60119f8 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@2x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@2x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@2x.png.meta new file mode 100644 index 0000000..30eb1d2 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8bf0b338ac2f94e279daf9b9dfa9007b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@3x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@3x.png new file mode 100644 index 0000000..f88ef81 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@3x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@3x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@3x.png.meta new file mode 100644 index 0000000..61d6116 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_close@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1159e8d0aa9894821a8f903c8097d2b9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@2x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@2x.png new file mode 100644 index 0000000..bd84e0e Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@2x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@2x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@2x.png.meta new file mode 100644 index 0000000..fecf0e4 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7bc6a119bc20c4d5ea4d379770ff6a6d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@3x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@3x.png new file mode 100644 index 0000000..2d91cde Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@3x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@3x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@3x.png.meta new file mode 100644 index 0000000..1d6fcc2 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_copy@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0193cba9b653e45b79d7ef353204f87c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@2x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@2x.png new file mode 100644 index 0000000..c54000b Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@2x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@2x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@2x.png.meta new file mode 100644 index 0000000..0d4009f --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cb0067ddf4ca9477a9ac3ea0b6e99069 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@3x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@3x.png new file mode 100644 index 0000000..8d87253 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@3x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@3x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@3x.png.meta new file mode 100644 index 0000000..5b363b4 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_friend@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0b04ba122f6f5473ebe2b618cf221137 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@2x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@2x.png new file mode 100644 index 0000000..6fdec14 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@2x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@2x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@2x.png.meta new file mode 100644 index 0000000..cda868c --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b3cf7cfb3c53340f08911ac7a55c3dca +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@3x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@3x.png new file mode 100644 index 0000000..380d047 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@3x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@3x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@3x.png.meta new file mode 100644 index 0000000..c3968eb --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_moment@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2dc4d99d769554564be4d71b807aa8c3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@2x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@2x.png new file mode 100644 index 0000000..3cd726d Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@2x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@2x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@2x.png.meta new file mode 100644 index 0000000..7d51d83 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c68534734ad4947028fed7a6d587c025 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@3x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@3x.png new file mode 100644 index 0000000..b277362 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@3x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@3x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@3x.png.meta new file mode 100644 index 0000000..31c390e --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_entry_navi@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8f3c17f13c0a64af2b88f09c6b5aab4f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@2x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@2x.png new file mode 100644 index 0000000..4f83614 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@2x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@2x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@2x.png.meta new file mode 100644 index 0000000..f057732 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 75bab1e152452460d9d52ca488e82ded +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@3x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@3x.png new file mode 100644 index 0000000..72ddd70 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@3x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@3x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@3x.png.meta new file mode 100644 index 0000000..61590c6 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_login_type_tap@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e0bbb2069574c4114a52c5d69caa8213 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@2x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@2x.png new file mode 100644 index 0000000..8fe5f07 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@2x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@2x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@2x.png.meta new file mode 100644 index 0000000..b79ab82 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 35e74acff0e084465a5301d849934a09 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@3x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@3x.png new file mode 100644 index 0000000..9e3da68 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@3x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@3x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@3x.png.meta new file mode 100644 index 0000000..18425cc --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_logout@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b4ddae784ac114cab9f570c9035e1a86 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@2x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@2x.png new file mode 100644 index 0000000..f4b63f4 Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@2x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@2x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@2x.png.meta new file mode 100644 index 0000000..4798060 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@2x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 699abc74846374faea061a9048c1342a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@3x.png b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@3x.png new file mode 100644 index 0000000..4f2ea9e Binary files /dev/null and b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@3x.png differ diff --git a/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@3x.png.meta b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@3x.png.meta new file mode 100644 index 0000000..988b3d8 --- /dev/null +++ b/Plugins/iOS/Resource/TapBootstrapResource.bundle/images/ic_reload@3x.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e3ce00a8cbc8c442eb6ab7f801a32cb5 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework.meta b/Plugins/iOS/TapBootstrapSDK.framework.meta new file mode 100644 index 0000000..ddb94f4 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework.meta @@ -0,0 +1,28 @@ +fileFormatVersion: 2 +guid: d0841683002f1434ea3c0f1e4019b0b6 +folderAsset: yes +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers.meta new file mode 100644 index 0000000..7719c1d --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cfe9a0574a8fd417b9ea53d7e2f85b38 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/AccessToken.h b/Plugins/iOS/TapBootstrapSDK.framework/Headers/AccessToken.h new file mode 100644 index 0000000..b8b08c6 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/AccessToken.h @@ -0,0 +1,25 @@ +// +// AccessToken.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/20. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AccessToken : NSObject +@property (nonatomic, copy) NSString *kid; +@property (nonatomic, copy) NSString *accessToken; +@property (nonatomic, copy) NSString *macAlgorithm; +@property (nonatomic, copy) NSString *tokenType; +@property (nonatomic, copy) NSString *macKey; +@property (nonatomic, assign) long expireIn; + +- (instancetype)initWithJsonString:(NSString *)json; + +- (NSString *)toJsonString; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/AccessToken.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers/AccessToken.h.meta new file mode 100644 index 0000000..38d7959 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/AccessToken.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 61473e60e12334525a6689a333a0c8d4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrap.h b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrap.h new file mode 100644 index 0000000..18f6256 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrap.h @@ -0,0 +1,85 @@ +// +// TapBootstrap.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/18. +// + +#import +#import +#import +#import +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM (NSInteger, TapBootstrapLoginType) { + TapBootstrapLoginTypeTapTap = 0, + TapBootstrapLoginTypeApple, + TapBootstrapLoginTypeGuest +}; + +typedef NS_ENUM (NSInteger, TapBootstrapBindType) { + TapBootstrapBindTypeTapTap +}; + +typedef void (^TapUserHandler)(TapUser *_Nullable userInfo, NSError *_Nullable error); +typedef void (^TapUserDetailsHandler)(TapUserDetails *_Nullable userDetail, NSError *_Nullable error); + +@interface TapBootstrap : NSObject + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; + +/// 初始化 +/// @param config 配置项 ++ (void)initWithConfig:(TapConfig *)config; + +/// 当前是否初始化 ++ (BOOL)isInitialized; + +/// 注册登录回调 +/// @param delegate 回调 ++ (void)registerLoginResultDelegate:(id )delegate; + +/// 注册用户状态变化回调 +/// @param delegate 回调 ++ (void)registerUserStatusChangedDelegate:(id )delegate; + +/// 登录 +/// @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; + +/// 获取用户详细信息 ++ (void)getUserDetails:(TapUserDetailsHandler)handler; + +/// 获取当前 token ++ (AccessToken *)getCurrentToken; + +/// 退出登录 ++ (void)logout; + +/// 打开用户中心 ++ (void)openUserCenter; + +/// 设定游戏倾向语言 +/// @param lang TapLanguageType 0-自动 1-简中 2-英文 ++ (void)setPreferredLanguage:(TapLanguageType)lang; + +/// 处理系统协议 +/// @param url url ++ (BOOL)handleOpenURL:(NSURL *)url; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrap.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrap.h.meta new file mode 100644 index 0000000..d244a37 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrap.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0a02a3c8a4f174f67b16ce72d31e7803 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrapSDK.h b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrapSDK.h new file mode 100644 index 0000000..a29754a --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrapSDK.h @@ -0,0 +1,26 @@ +// +// TapBootstrapSDK.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/3/26. +// + +#import + +//! Project version number for TapBootstrapSDK. +FOUNDATION_EXPORT double TapBootstrapSDKVersionNumber; + +//! Project version string for TapBootstrapSDK. +FOUNDATION_EXPORT const unsigned char TapBootstrapSDKVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrapSDK.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrapSDK.h.meta new file mode 100644 index 0000000..06b0300 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapBootstrapSDK.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eb1761c8e43784a58a0ce866b0dd1e5d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapLoginResultDelegate.h b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapLoginResultDelegate.h new file mode 100644 index 0000000..30f503b --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapLoginResultDelegate.h @@ -0,0 +1,28 @@ +// +// TapLoginResultDelegate.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/19. +// + +#import +@class AccessToken; + +NS_ASSUME_NONNULL_BEGIN + +@protocol TapLoginResultDelegate + +/// 登录成功回调 +/// @param token token对象 +- (void)onLoginSuccess:(AccessToken *)token; + +/// 登录取消 +- (void)onLoginCancel; + +/// 登录失败 +/// @param error 失败原因 +- (void)onLoginError:(NSError *)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapLoginResultDelegate.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapLoginResultDelegate.h.meta new file mode 100644 index 0000000..f2d05fc --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapLoginResultDelegate.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ad80ac2afec0f42b7bfe4692ac80d23a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapSDKConstants.h b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapSDKConstants.h new file mode 100644 index 0000000..5a1cc2c --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapSDKConstants.h @@ -0,0 +1,27 @@ +// +// TapSDKConstants.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/25. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +#define TapSDK @"TapSDK" +#define TapSDK_VERSION_NUMBER @"2" +#define TapSDK_VERSION @"2.0.0" + +FOUNDATION_EXTERN int const ERROR_CODE_UNDEFINED; +FOUNDATION_EXTERN int const ERROR_CODE_UNINITIALIZED; + +FOUNDATION_EXTERN int const ERROR_CODE_BIND_CANCEL; +FOUNDATION_EXTERN int const ERROR_CODE_BIND_ERROR; + +FOUNDATION_EXTERN int const ERROR_CODE_LOGOUT_INVALID_LOGIN_STATE; +FOUNDATION_EXTERN int const ERROR_CODE_LOGOUT_USER_CENER_LOGOUT; +FOUNDATION_EXTERN int const ERROR_CODE_LOGOUT_GAME; +FOUNDATION_EXTERN int const ERROR_CODE_LOGOUT_KICKED; + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapSDKConstants.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapSDKConstants.h.meta new file mode 100644 index 0000000..30f1cb6 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapSDKConstants.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b716debdfccf445ae8a84267cf750da0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUser.h b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUser.h new file mode 100644 index 0000000..de40d8e --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUser.h @@ -0,0 +1,23 @@ +// +// TapUser.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TapUser : NSObject +@property (nonatomic, copy) NSString *userId; +@property (nonatomic, copy, nullable) NSString *name; +@property (nonatomic, copy, nullable) NSString *avatar; +@property (nonatomic, copy, nullable) NSString *taptapUserId; +@property (nonatomic, assign) BOOL isGuest; +@property (nonatomic, assign) long gender; + +- (NSString *)toJsonString; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUser.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUser.h.meta new file mode 100644 index 0000000..1206d1d --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUser.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7b294f5d35e0a4d41bc232d6b958ebce +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserCenterEntry.h b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserCenterEntry.h new file mode 100644 index 0000000..2b863bc --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserCenterEntry.h @@ -0,0 +1,17 @@ +// +// TapUserCenterEntry.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/23. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TapUserCenterEntry : NSObject +@property (nonatomic, assign) BOOL isMomentEnabled; +@property (nonatomic, assign) BOOL isFriendEnabled; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserCenterEntry.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserCenterEntry.h.meta new file mode 100644 index 0000000..77f2849 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserCenterEntry.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6ca2874ba7672473f903108f17530475 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserDetails.h b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserDetails.h new file mode 100644 index 0000000..0171c6d --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserDetails.h @@ -0,0 +1,25 @@ +// +// TapUserDetails.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/19. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TapUserDetails : NSObject +@property (nonatomic, copy) NSString *userId; +@property (nonatomic, copy, nullable) NSString *name; +@property (nonatomic, copy, nullable) NSString *avatar; +@property (nonatomic, assign) BOOL isGuest; +@property (nonatomic, assign) long gender; + +@property (nonatomic, strong) TapUserCenterEntry *userCenterEntry; + +- (NSString *)toJsonString; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserDetails.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserDetails.h.meta new file mode 100644 index 0000000..d5919ea --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserDetails.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3dce98196c5cf4d84a6acdd0b983bfcb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserStatusChangedDelegate.h b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserStatusChangedDelegate.h new file mode 100644 index 0000000..4b110eb --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserStatusChangedDelegate.h @@ -0,0 +1,25 @@ +// +// TapUserStatusChangedDelegate.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol TapUserStatusChangedDelegate + +/// 退出登录 +/// @param error 如果是因为出错导致的退登,则返回错误信息 +- (void)onLogout:(NSError *_Nullable)error; + +/// 绑定回调 +/// @param error 如果是因为出错导致的退登,则返回错误信息 +@optional +- (void)onBind:(NSError *_Nullable)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserStatusChangedDelegate.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserStatusChangedDelegate.h.meta new file mode 100644 index 0000000..b68fff3 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Headers/TapUserStatusChangedDelegate.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9aa7a7bb727b9450c9c190ba202cb080 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Info.plist b/Plugins/iOS/TapBootstrapSDK.framework/Info.plist new file mode 100644 index 0000000..b9a6a83 Binary files /dev/null and b/Plugins/iOS/TapBootstrapSDK.framework/Info.plist differ diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Info.plist.meta b/Plugins/iOS/TapBootstrapSDK.framework/Info.plist.meta new file mode 100644 index 0000000..f357d5c --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Info.plist.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 18e8bf815246941e780accbad0d3cab0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Modules.meta b/Plugins/iOS/TapBootstrapSDK.framework/Modules.meta new file mode 100644 index 0000000..8199932 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Modules.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 58fca80acb0f343e587666a721ab99c8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Modules/module.modulemap b/Plugins/iOS/TapBootstrapSDK.framework/Modules/module.modulemap new file mode 100644 index 0000000..267bc2e --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module TapBootstrapSDK { + umbrella header "TapBootstrapSDK.h" + + export * + module * { export * } +} diff --git a/Plugins/iOS/TapBootstrapSDK.framework/Modules/module.modulemap.meta b/Plugins/iOS/TapBootstrapSDK.framework/Modules/module.modulemap.meta new file mode 100644 index 0000000..4a0b80d --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/Modules/module.modulemap.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 843ded79c37cd4f01a38350a7763535d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders.meta new file mode 100644 index 0000000..2ab7ecd --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2b043b2f979ad4cf8835775eea533ec3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginApple.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginApple.h new file mode 100644 index 0000000..85fff55 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginApple.h @@ -0,0 +1,23 @@ +// +// LoginApple.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/23. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface LoginApple : NSObject + ++ (instancetype)shareInstance; + +- (void)login; + ++ (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginApple.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginApple.h.meta new file mode 100644 index 0000000..6d5d3e6 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginApple.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 32e512034e2034dcb86c20defe486cfc +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginGuest.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginGuest.h new file mode 100644 index 0000000..78dea9f --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginGuest.h @@ -0,0 +1,18 @@ +// +// LoginGuest.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/23. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface LoginGuest : NSObject + ++ (void)login; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginGuest.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginGuest.h.meta new file mode 100644 index 0000000..51de091 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginGuest.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a1b8337c6b33c4091abf83ecd68b0ab8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginTap.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginTap.h new file mode 100644 index 0000000..f8987ec --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginTap.h @@ -0,0 +1,21 @@ +// +// LoginTap.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/23. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface LoginTap : NSObject ++ (instancetype)shareInstance; + +- (void)login:(NSArray *)permissions; + +- (void)bind:(NSArray *)permissions; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginTap.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginTap.h.meta new file mode 100644 index 0000000..b6cc78f --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/LoginTap.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 73bae0de4a5164442bc9db0271cf0f8d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSAPI.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSAPI.h new file mode 100644 index 0000000..c9329b7 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSAPI.h @@ -0,0 +1,34 @@ +// +// TDSAPI.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/19. +// + +#import +#import + +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 diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSAPI.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSAPI.h.meta new file mode 100644 index 0000000..01797db --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSAPI.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dea88930f52054b93bd25d39ac37fbe1 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSLogoutConfirmView.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSLogoutConfirmView.h new file mode 100644 index 0000000..fc52d03 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSLogoutConfirmView.h @@ -0,0 +1,16 @@ +// +// TDSLogoutConfirmView.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/3/1. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSLogoutConfirmView : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSLogoutConfirmView.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSLogoutConfirmView.h.meta new file mode 100644 index 0000000..bb99c7b --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSLogoutConfirmView.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 42fb9bb1de8f841f79ca7073cd5a140f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSNetManager.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSNetManager.h new file mode 100644 index 0000000..48ddf3b --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSNetManager.h @@ -0,0 +1,41 @@ +// +// TDSNetManager.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/23. +// + +#import +#import +#import +#import +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 diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSNetManager.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSNetManager.h.meta new file mode 100644 index 0000000..bb4f8ab --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSNetManager.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ef1da092d2ebe4e958bc289d8e917498 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryCell.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryCell.h new file mode 100644 index 0000000..8e50b20 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryCell.h @@ -0,0 +1,17 @@ +// +// TDSUCEntryCell.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/3/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSUCEntryCell : UITableViewCell + +- (void)setTitleText:(NSString *)title icon:(UIImage *)image needSeparator:(BOOL)needSeparator; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryCell.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryCell.h.meta new file mode 100644 index 0000000..55519d4 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryCell.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: baef23832449a4da3853a4a446cac87d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryListView.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryListView.h new file mode 100644 index 0000000..83685e0 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryListView.h @@ -0,0 +1,19 @@ +// +// TDSUCEntryListView.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/3/11. +// + +#import +#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 diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryListView.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryListView.h.meta new file mode 100644 index 0000000..5755671 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCEntryListView.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 094f978ae43894ca2a97a33b036c68f1 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCHeadView.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCHeadView.h new file mode 100644 index 0000000..d8c6292 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCHeadView.h @@ -0,0 +1,19 @@ +// +// TDSUCHeadView.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/3/11. +// + +#import +#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 diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCHeadView.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCHeadView.h.meta new file mode 100644 index 0000000..692dcb3 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUCHeadView.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 977719d17cbc24f4e80c381fe8f7220b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUIManager.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUIManager.h new file mode 100644 index 0000000..3f6df64 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUIManager.h @@ -0,0 +1,28 @@ +// +// TDSUIManager.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/3/1. +// + +#import +#import + +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 diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUIManager.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUIManager.h.meta new file mode 100644 index 0000000..3dcf704 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUIManager.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 137a505e45cdd43869d8afb35b9c2f21 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserCenterView.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserCenterView.h new file mode 100644 index 0000000..5b30c8f --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserCenterView.h @@ -0,0 +1,25 @@ +// +// TDSUserCenterView.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/3/1. +// + +#import +#import "TapUserDetails.h" + +NS_ASSUME_NONNULL_BEGIN +@protocol TDSUserCenterProtocol + +- (void)onReloadData; +- (void)onClose; +@end + +@interface TDSUserCenterView : UIView + +@property (nonatomic, weak) id delegate; + +- (void)loadData:(TapUserDetails *)userDetail; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserCenterView.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserCenterView.h.meta new file mode 100644 index 0000000..5aa900b --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserCenterView.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c6573b53f916748a0bbb8121627c3d9f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserInfoList.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserInfoList.h new file mode 100644 index 0000000..a55c822 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserInfoList.h @@ -0,0 +1,17 @@ +// +// TDSUserInfoList.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/3/12. +// + +#import +#import "TapUser.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface TDSUserInfoList : NSObject +@property (nonatomic) NSMutableArray *list; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserInfoList.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserInfoList.h.meta new file mode 100644 index 0000000..71482d0 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TDSUserInfoList.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cf617d4d4a44847e6b62707d18d35b2f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapBootstrapService.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapBootstrapService.h new file mode 100644 index 0000000..e4a8f22 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapBootstrapService.h @@ -0,0 +1,37 @@ +// +// TapBootstrapService.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/24. +// + +#import + +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 diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapBootstrapService.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapBootstrapService.h.meta new file mode 100644 index 0000000..ff6f9fb --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapBootstrapService.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b535beae94af1458b9441fcae62323f0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapSDKImpl.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapSDKImpl.h new file mode 100644 index 0000000..beed65d --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapSDKImpl.h @@ -0,0 +1,54 @@ +// +// TapSDKImpl.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/23. +// + +#import +#import +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TapSDKImpl : NSObject +@property (nonatomic, weak) idloginResultDelegate; +@property (nonatomic, weak) iduserStatusChangeDelegate; + +@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; + +- (nullable TDSAccount *)getAccount; +@end + +NS_ASSUME_NONNULL_END diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapSDKImpl.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapSDKImpl.h.meta new file mode 100644 index 0000000..54c3716 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TapSDKImpl.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b45ea473c55d24f79b4e64a9e46fa3d3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TokenManager.h b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TokenManager.h new file mode 100644 index 0000000..4999cac --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TokenManager.h @@ -0,0 +1,26 @@ +// +// TokenManager.h +// TapBootstrapSDK +// +// Created by Bottle K on 2021/2/20. +// + +#import +#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 diff --git a/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TokenManager.h.meta b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TokenManager.h.meta new file mode 100644 index 0000000..4b8c798 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/PrivateHeaders/TokenManager.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2bda5af4b5f684cacae49822373cba6f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/iOS/TapBootstrapSDK.framework/TapBootstrapSDK b/Plugins/iOS/TapBootstrapSDK.framework/TapBootstrapSDK new file mode 100644 index 0000000..ba3d440 Binary files /dev/null and b/Plugins/iOS/TapBootstrapSDK.framework/TapBootstrapSDK differ diff --git a/Plugins/iOS/TapBootstrapSDK.framework/TapBootstrapSDK.meta b/Plugins/iOS/TapBootstrapSDK.framework/TapBootstrapSDK.meta new file mode 100644 index 0000000..61820c8 --- /dev/null +++ b/Plugins/iOS/TapBootstrapSDK.framework/TapBootstrapSDK.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b5c7b4cfaec574e719b3d4b66f14e4e7 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/README.md b/README.md new file mode 100644 index 0000000..8b227d9 --- /dev/null +++ b/README.md @@ -0,0 +1,68 @@ +# [使用 TapTap.Bootstrap ](./Documentations/README.md) + +## 1.命名空间 + +```c# +using TapTap.Bootstrap; +``` + +## 2.接口描述 + +### 初始化 + +```c# +TapConfig config = new TapConfig(string clientId,bool isCN); +TapBootstrap.Init(config); +``` + +### 登陆 + +```c# +TapBootstrap.Login(LoginType loginType, string[] permissions); +``` + +### 设置语言 +```c# +TapBootstrap.SetPreferLanguage(TapLanguage tapLanguage); +``` + +### 绑定TapTap账号 +```c# +TapBootstrap.Bind(LoginType loginType, string[] permissions); +``` + +### 注册用户状态回调 + +```c# +TapBootstrap.RegisterUserStatusChangedListener(ITapUserStatusChangedListener listener); +``` + +### 注册登陆回调 +```c# +TapBootstrap.RegisterLoginResultListener(ITapLoginResultListener listener); +``` + +### 获取用户信息 +```c# +TapBootstrap.GetUser(Action action); +``` + +### 获取详细用户信息 +```c# +TapBootstrap.GetDetailUser(Action action); +``` + +### 获取AccessToken +```c# +TapBootstrap.GetDetailUser(Action action); +``` + +### 登出 +```c# +TapBootstrap.Logout(); +``` + +### 打开用户中心 +```c# +TapBootstrap.OpenUserCenter(); +``` \ No newline at end of file diff --git a/README.md.meta b/README.md.meta new file mode 100644 index 0000000..74191cc --- /dev/null +++ b/README.md.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c5330aab2c6a41699a1601f1af6b27d9 +timeCreated: 1616755935 \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..b9b76a8 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "com.tapsdk.bootstrap", + "displayName": "Tap Bootstrap", + "description": "TapTap Develop Service", + "version": "2.0.0", + "unity": "2018.3", + "license": "MIT", + "dependencies": { + "com.tapsdk.common": "https://github.com/TapTap/TapCommon-Unity.git#0.0.1" + } +} diff --git a/package.json.meta b/package.json.meta new file mode 100644 index 0000000..a42bf59 --- /dev/null +++ b/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e618b9375caf846708cffea428908521 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: