com.taptap.sdk.core 4.3.0-aplha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/BuildTargetUtils.cs +14 -0
- package/Editor/BuildTargetUtils.cs.meta +11 -0
- package/Editor/LinkXMLGenerator.cs +70 -0
- package/Editor/LinkXMLGenerator.cs.meta +11 -0
- package/Editor/Plist.cs +954 -0
- package/Editor/Plist.cs.meta +3 -0
- package/Editor/SDKLinkProcessBuild.cs +119 -0
- package/Editor/SDKLinkProcessBuild.cs.meta +11 -0
- package/Editor/TapFileHelper.cs +168 -0
- package/Editor/TapFileHelper.cs.meta +3 -0
- package/Editor/TapSDK.Core.Editor.asmdef +15 -0
- package/Editor/TapSDK.Core.Editor.asmdef.meta +7 -0
- package/Editor/TapSDKCoreCompile.cs +284 -0
- package/Editor/TapSDKCoreCompile.cs.meta +3 -0
- package/Editor/TapSDKCoreIOSProcessor.cs +74 -0
- package/Editor/TapSDKCoreIOSProcessor.cs.meta +3 -0
- package/Editor/UI/ScrollViewEditor.cs +267 -0
- package/Editor/UI/ScrollViewEditor.cs.meta +12 -0
- package/Editor/UI/ScrollViewExEditor.cs +34 -0
- package/Editor/UI/ScrollViewExEditor.cs.meta +12 -0
- package/Editor/UI/TapSDK.UI.Editor.asmdef +17 -0
- package/Editor/UI/TapSDK.UI.Editor.asmdef.meta +7 -0
- package/Editor/UI.meta +9 -0
- package/Editor.meta +8 -0
- package/Mobile/Editor/NativeDependencies.xml +22 -0
- package/Mobile/Editor/NativeDependencies.xml.meta +7 -0
- package/Mobile/Editor/TapCommonMobileProcessBuild.cs +20 -0
- package/Mobile/Editor/TapCommonMobileProcessBuild.cs.meta +11 -0
- package/Mobile/Editor/TapSDK.Core.Mobile.Editor.asmdef +17 -0
- package/Mobile/Editor/TapSDK.Core.Mobile.Editor.asmdef.meta +7 -0
- package/Mobile/Editor.meta +8 -0
- package/Mobile/Runtime/AndroidNativeWrapper.cs +50 -0
- package/Mobile/Runtime/AndroidNativeWrapper.cs.meta +11 -0
- package/Mobile/Runtime/Bridge.cs +84 -0
- package/Mobile/Runtime/Bridge.cs.meta +11 -0
- package/Mobile/Runtime/BridgeAndroid.cs +73 -0
- package/Mobile/Runtime/BridgeAndroid.cs.meta +11 -0
- package/Mobile/Runtime/BridgeCallback.cs +35 -0
- package/Mobile/Runtime/BridgeCallback.cs.meta +11 -0
- package/Mobile/Runtime/BridgeIOS.cs +113 -0
- package/Mobile/Runtime/BridgeIOS.cs.meta +11 -0
- package/Mobile/Runtime/Command.cs +119 -0
- package/Mobile/Runtime/Command.cs.meta +11 -0
- package/Mobile/Runtime/Constants.cs +9 -0
- package/Mobile/Runtime/Constants.cs.meta +11 -0
- package/Mobile/Runtime/EngineBridgeInitializer.cs +33 -0
- package/Mobile/Runtime/EngineBridgeInitializer.cs.meta +11 -0
- package/Mobile/Runtime/IBridge.cs +15 -0
- package/Mobile/Runtime/IBridge.cs.meta +11 -0
- package/Mobile/Runtime/IOSNativeWrapper.cs +273 -0
- package/Mobile/Runtime/IOSNativeWrapper.cs.meta +11 -0
- package/Mobile/Runtime/Result.cs +37 -0
- package/Mobile/Runtime/Result.cs.meta +11 -0
- package/Mobile/Runtime/TapCoreMobile.cs +71 -0
- package/Mobile/Runtime/TapCoreMobile.cs.meta +11 -0
- package/Mobile/Runtime/TapEventMobile.cs +265 -0
- package/Mobile/Runtime/TapEventMobile.cs.meta +11 -0
- package/Mobile/Runtime/TapSDK.Core.Mobile.Runtime.asmdef +18 -0
- package/Mobile/Runtime/TapSDK.Core.Mobile.Runtime.asmdef.meta +7 -0
- package/Mobile/Runtime/TapUUID.cs +9 -0
- package/Mobile/Runtime/TapUUID.cs.meta +11 -0
- package/Mobile/Runtime.meta +8 -0
- package/Mobile.meta +8 -0
- package/Plugins/iOS.meta +8 -0
- package/Plugins.meta +8 -0
- package/Resources/Fonts/taptap-sdk-bold.ttf +0 -0
- package/Resources/Fonts/taptap-sdk-bold.ttf.meta +22 -0
- package/Resources/Fonts/taptap-sdk.ttf +0 -0
- package/Resources/Fonts/taptap-sdk.ttf.meta +21 -0
- package/Resources/Fonts.meta +8 -0
- package/Resources/Loading.prefab +260 -0
- package/Resources/Loading.prefab.meta +7 -0
- package/Resources/TapCommonTip.prefab +194 -0
- package/Resources/TapCommonTip.prefab.meta +7 -0
- package/Resources/TapCommonToastBlack.prefab +528 -0
- package/Resources/TapCommonToastBlack.prefab.meta +7 -0
- package/Resources/TapCommonToastWhite.prefab +411 -0
- package/Resources/TapCommonToastWhite.prefab.meta +7 -0
- package/Resources/TapSDKCommonTapIcon-v2.png +0 -0
- package/Resources/TapSDKCommonTapIcon-v2.png.meta +128 -0
- package/Resources/TapSDKCommonTapIcon.png +0 -0
- package/Resources/TapSDKCommonTapIcon.png.meta +128 -0
- package/Resources/TapSDKCommonToastBg.png +0 -0
- package/Resources/TapSDKCommonToastBg.png.meta +128 -0
- package/Resources/TapSDKConstantUIRoot.prefab +100 -0
- package/Resources/TapSDKConstantUIRoot.prefab.meta +7 -0
- package/Resources/TapSDKUIRoot.prefab +100 -0
- package/Resources/TapSDKUIRoot.prefab.meta +7 -0
- package/Resources/TapTapBtn_White.png +0 -0
- package/Resources/TapTapBtn_White.png.meta +128 -0
- package/Resources/TapTapBtn_White_2.png +0 -0
- package/Resources/TapTapBtn_White_2.png.meta +128 -0
- package/Resources/ToastBackground.png +0 -0
- package/Resources/ToastBackground.png.meta +128 -0
- package/Resources/detail_bg.png +0 -0
- package/Resources/detail_bg.png.meta +92 -0
- package/Resources/success.png +0 -0
- package/Resources/success.png.meta +128 -0
- package/Resources/taptap-bg.png +0 -0
- package/Resources/taptap-bg.png.meta +140 -0
- package/Resources/taptap-close.png +0 -0
- package/Resources/taptap-close.png.meta +146 -0
- package/Resources/taptap-router-v2.png +0 -0
- package/Resources/taptap-router-v2.png.meta +128 -0
- package/Resources/taptap-router.png +0 -0
- package/Resources/taptap-router.png.meta +146 -0
- package/Resources/taptap-sdk-refresh 1.png +0 -0
- package/Resources/taptap-sdk-refresh 1.png.meta +128 -0
- package/Resources/taptap-toast-error.png +0 -0
- package/Resources/taptap-toast-error.png.meta +128 -0
- package/Resources/taptap-toast-info.png +0 -0
- package/Resources/taptap-toast-info.png.meta +128 -0
- package/Resources/taptap-toast-success.png +0 -0
- package/Resources/taptap-toast-success.png.meta +128 -0
- package/Resources/taptap-toast-warning.png +0 -0
- package/Resources/taptap-toast-warning.png.meta +128 -0
- package/Resources.meta +8 -0
- package/Runtime/Internal/Http/TapHttpClient.cs +176 -0
- package/Runtime/Internal/Http/TapHttpClient.cs.meta +11 -0
- package/Runtime/Internal/Http/TapHttpUtils.cs +83 -0
- package/Runtime/Internal/Http/TapHttpUtils.cs.meta +11 -0
- package/Runtime/Internal/Http.meta +8 -0
- package/Runtime/Internal/Init/IInitTask.cs +18 -0
- package/Runtime/Internal/Init/IInitTask.cs.meta +11 -0
- package/Runtime/Internal/Init.meta +8 -0
- package/Runtime/Internal/Json/TapJsonConverter.cs +40 -0
- package/Runtime/Internal/Json/TapJsonConverter.cs.meta +11 -0
- package/Runtime/Internal/Json.meta +8 -0
- package/Runtime/Internal/Platform/ITapCorePlatform.cs +12 -0
- package/Runtime/Internal/Platform/ITapCorePlatform.cs.meta +11 -0
- package/Runtime/Internal/Platform/ITapEventPlatform.cs +37 -0
- package/Runtime/Internal/Platform/ITapEventPlatform.cs.meta +11 -0
- package/Runtime/Internal/Platform/PlatformTypeUtils.cs +46 -0
- package/Runtime/Internal/Platform/PlatformTypeUtils.cs.meta +11 -0
- package/Runtime/Internal/Platform.meta +8 -0
- package/Runtime/Internal/UI/Base/Const.cs +27 -0
- package/Runtime/Internal/UI/Base/Const.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/GraphicRaycasterBugFixed.cs +240 -0
- package/Runtime/Internal/UI/Base/GraphicRaycasterBugFixed.cs.meta +3 -0
- package/Runtime/Internal/UI/Base/LoadingPanelController.cs +29 -0
- package/Runtime/Internal/UI/Base/LoadingPanelController.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/MonoSingleton.cs +102 -0
- package/Runtime/Internal/UI/Base/MonoSingleton.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/Singleton.cs +29 -0
- package/Runtime/Internal/UI/Base/Singleton.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/TipPanelController.cs +45 -0
- package/Runtime/Internal/UI/Base/TipPanelController.cs.meta +3 -0
- package/Runtime/Internal/UI/Base/ToastBlackPanelController.cs +95 -0
- package/Runtime/Internal/UI/Base/ToastBlackPanelController.cs.meta +11 -0
- package/Runtime/Internal/UI/Base/ToastWhitePanelController.cs +79 -0
- package/Runtime/Internal/UI/Base/ToastWhitePanelController.cs.meta +3 -0
- package/Runtime/Internal/UI/Base/UIManager.cs +724 -0
- package/Runtime/Internal/UI/Base/UIManager.cs.meta +11 -0
- package/Runtime/Internal/UI/Base.meta +8 -0
- package/Runtime/Internal/UI/BasePanel/BasePanelController.cs +385 -0
- package/Runtime/Internal/UI/BasePanel/BasePanelController.cs.meta +11 -0
- package/Runtime/Internal/UI/BasePanel.meta +8 -0
- package/Runtime/Internal/UI/Params/BasePanelConfig.cs +18 -0
- package/Runtime/Internal/UI/Params/BasePanelConfig.cs.meta +11 -0
- package/Runtime/Internal/UI/Params/IOpenPanelParameter.cs +7 -0
- package/Runtime/Internal/UI/Params/IOpenPanelParameter.cs.meta +11 -0
- package/Runtime/Internal/UI/Params.meta +8 -0
- package/Runtime/Internal/UI/ScrollViewEx/ObjPool/SimpleObjPool.cs +76 -0
- package/Runtime/Internal/UI/ScrollViewEx/ObjPool/SimpleObjPool.cs.meta +12 -0
- package/Runtime/Internal/UI/ScrollViewEx/ObjPool.meta +9 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView/ScrollView.cs +828 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView/ScrollView.cs.meta +12 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView/ScrollViewEx.cs +245 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView/ScrollViewEx.cs.meta +12 -0
- package/Runtime/Internal/UI/ScrollViewEx/ScrollView.meta +9 -0
- package/Runtime/Internal/UI/ScrollViewEx.meta +8 -0
- package/Runtime/Internal/UI.meta +8 -0
- package/Runtime/Internal/Utils/BridgeUtils.cs +29 -0
- package/Runtime/Internal/Utils/BridgeUtils.cs.meta +11 -0
- package/Runtime/Internal/Utils/ImageUtils.cs +147 -0
- package/Runtime/Internal/Utils/ImageUtils.cs.meta +11 -0
- package/Runtime/Internal/Utils/TapLoom.cs +155 -0
- package/Runtime/Internal/Utils/TapLoom.cs.meta +11 -0
- package/Runtime/Internal/Utils/UrlUtils.cs +34 -0
- package/Runtime/Internal/Utils/UrlUtils.cs.meta +11 -0
- package/Runtime/Internal/Utils.meta +8 -0
- package/Runtime/Internal.meta +8 -0
- package/Runtime/Public/DataStorage.cs +141 -0
- package/Runtime/Public/DataStorage.cs.meta +11 -0
- package/Runtime/Public/ITapPropertiesProxy.cs +6 -0
- package/Runtime/Public/ITapPropertiesProxy.cs.meta +11 -0
- package/Runtime/Public/Json.cs +636 -0
- package/Runtime/Public/Json.cs.meta +11 -0
- package/Runtime/Public/Log/TapLogLevel.cs +7 -0
- package/Runtime/Public/Log/TapLogLevel.cs.meta +11 -0
- package/Runtime/Public/Log/TapLogger.cs +48 -0
- package/Runtime/Public/Log/TapLogger.cs.meta +11 -0
- package/Runtime/Public/Log.meta +8 -0
- package/Runtime/Public/Platform.cs +27 -0
- package/Runtime/Public/Platform.cs.meta +11 -0
- package/Runtime/Public/RegionType.cs +8 -0
- package/Runtime/Public/RegionType.cs.meta +11 -0
- package/Runtime/Public/SafeDictionary.cs +27 -0
- package/Runtime/Public/SafeDictionary.cs.meta +11 -0
- package/Runtime/Public/TapError.cs +62 -0
- package/Runtime/Public/TapError.cs.meta +11 -0
- package/Runtime/Public/TapErrorCode.cs +44 -0
- package/Runtime/Public/TapErrorCode.cs.meta +11 -0
- package/Runtime/Public/TapException.cs +24 -0
- package/Runtime/Public/TapException.cs.meta +11 -0
- package/Runtime/Public/TapLanguage.cs +21 -0
- package/Runtime/Public/TapLanguage.cs.meta +11 -0
- package/Runtime/Public/TapLocalizeManager.cs +128 -0
- package/Runtime/Public/TapLocalizeManager.cs.meta +11 -0
- package/Runtime/Public/TapTapEvent.cs +93 -0
- package/Runtime/Public/TapTapEvent.cs.meta +11 -0
- package/Runtime/Public/TapTapSDK.cs +96 -0
- package/Runtime/Public/TapTapSDK.cs.meta +11 -0
- package/Runtime/Public/TapTapSDKCoreOptions.cs +104 -0
- package/Runtime/Public/TapTapSDKCoreOptions.cs.meta +11 -0
- package/Runtime/Public.meta +8 -0
- package/Runtime/TapSDK.Core.Runtime.asmdef +3 -0
- package/Runtime/TapSDK.Core.Runtime.asmdef.meta +7 -0
- package/Runtime.meta +8 -0
- package/Standalone/Editor/TapCoreStandaloneProcessBuild.cs +20 -0
- package/Standalone/Editor/TapCoreStandaloneProcessBuild.cs.meta +11 -0
- package/Standalone/Editor/TapSDK.Core.Standalone.Editor.asmdef +17 -0
- package/Standalone/Editor/TapSDK.Core.Standalone.Editor.asmdef.meta +7 -0
- package/Standalone/Editor.meta +8 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/Info.plist +46 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/Info.plist.meta +7 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/MacOS/TapDBDeviceInfo +0 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/MacOS/TapDBDeviceInfo.meta +7 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/MacOS.meta +8 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/_CodeSignature/CodeResources +115 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/_CodeSignature/CodeResources.meta +7 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents/_CodeSignature.meta +8 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle/Contents.meta +8 -0
- package/Standalone/Plugins/macOS/TapDBDeviceInfo.bundle.meta +33 -0
- package/Standalone/Plugins/macOS.meta +8 -0
- package/Standalone/Plugins.meta +8 -0
- package/Standalone/Runtime/Internal/Constants.cs +37 -0
- package/Standalone/Runtime/Internal/Constants.cs.meta +11 -0
- package/Standalone/Runtime/Internal/DeviceInfo.cs +152 -0
- package/Standalone/Runtime/Internal/DeviceInfo.cs.meta +11 -0
- package/Standalone/Runtime/Internal/EventSender.cs +239 -0
- package/Standalone/Runtime/Internal/EventSender.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Http/HttpClient.cs +211 -0
- package/Standalone/Runtime/Internal/Http/HttpClient.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Http/NetUtils.cs +48 -0
- package/Standalone/Runtime/Internal/Http/NetUtils.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Http/TimeUtil.cs +30 -0
- package/Standalone/Runtime/Internal/Http/TimeUtil.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Http.meta +8 -0
- package/Standalone/Runtime/Internal/Identity.cs +43 -0
- package/Standalone/Runtime/Internal/Identity.cs.meta +11 -0
- package/Standalone/Runtime/Internal/PlayRecorder.cs +53 -0
- package/Standalone/Runtime/Internal/PlayRecorder.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Prefs.cs +85 -0
- package/Standalone/Runtime/Internal/Prefs.cs.meta +11 -0
- package/Standalone/Runtime/Internal/Tracker.cs +318 -0
- package/Standalone/Runtime/Internal/Tracker.cs.meta +11 -0
- package/Standalone/Runtime/Internal/User.cs +51 -0
- package/Standalone/Runtime/Internal/User.cs.meta +11 -0
- package/Standalone/Runtime/Internal.meta +8 -0
- package/Standalone/Runtime/Public/EventManager.cs +41 -0
- package/Standalone/Runtime/Public/EventManager.cs.meta +11 -0
- package/Standalone/Runtime/Public/TapCoreStandalone.cs +197 -0
- package/Standalone/Runtime/Public/TapCoreStandalone.cs.meta +11 -0
- package/Standalone/Runtime/Public/TapEventStandalone.cs +281 -0
- package/Standalone/Runtime/Public/TapEventStandalone.cs.meta +11 -0
- package/Standalone/Runtime/Public.meta +8 -0
- package/Standalone/Runtime/TapSDK.Core.Standalone.Runtime.asmdef +21 -0
- package/Standalone/Runtime/TapSDK.Core.Standalone.Runtime.asmdef.meta +7 -0
- package/Standalone/Runtime.meta +8 -0
- package/Standalone.meta +8 -0
- package/package.json +8 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Threading.Tasks;
|
|
3
|
+
using System.Linq;
|
|
4
|
+
using TapSDK.Core.Internal;
|
|
5
|
+
using System.Collections.Generic;
|
|
6
|
+
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
using System.Reflection;
|
|
9
|
+
using TapSDK.Core.Internal.Init;
|
|
10
|
+
|
|
11
|
+
namespace TapSDK.Core {
|
|
12
|
+
public class TapTapSDK {
|
|
13
|
+
public static readonly string SDKVersion = "4.3.0";
|
|
14
|
+
public static readonly int SDKVersionCode = 32900001;
|
|
15
|
+
public static string SDKPlatform = "TapSDK-Unity";
|
|
16
|
+
|
|
17
|
+
public static TapTapSDKCoreOptions tapTapSDKCoreOptions;
|
|
18
|
+
private static ITapCorePlatform platformWrapper;
|
|
19
|
+
|
|
20
|
+
private static bool disableDurationStatistics;
|
|
21
|
+
|
|
22
|
+
public static bool DisableDurationStatistics {
|
|
23
|
+
get => disableDurationStatistics;
|
|
24
|
+
set {
|
|
25
|
+
disableDurationStatistics = value;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static TapTapSDK() {
|
|
30
|
+
platformWrapper = PlatformTypeUtils.CreatePlatformImplementationObject(typeof(ITapCorePlatform),
|
|
31
|
+
"TapSDK.Core") as ITapCorePlatform;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public static void Init(TapTapSDKCoreOptions coreOption) {
|
|
35
|
+
if (coreOption == null)
|
|
36
|
+
throw new ArgumentException("[TapSDK] options is null!");
|
|
37
|
+
if (string.IsNullOrEmpty(coreOption.clientId))
|
|
38
|
+
throw new ArgumentException("[TapSDK] clientID is null or empty!");
|
|
39
|
+
TapTapSDK.tapTapSDKCoreOptions = coreOption;
|
|
40
|
+
platformWrapper?.Init(coreOption);
|
|
41
|
+
// 初始化各个模块
|
|
42
|
+
|
|
43
|
+
Type[] initTaskTypes = GetInitTypeList();
|
|
44
|
+
if (initTaskTypes != null) {
|
|
45
|
+
List<IInitTask> initTasks = new List<IInitTask>();
|
|
46
|
+
foreach (Type initTaskType in initTaskTypes) {
|
|
47
|
+
initTasks.Add(Activator.CreateInstance(initTaskType) as IInitTask);
|
|
48
|
+
}
|
|
49
|
+
initTasks = initTasks.OrderBy(task => task.Order).ToList();
|
|
50
|
+
foreach (IInitTask task in initTasks) {
|
|
51
|
+
TapLogger.Debug($"Init: {task.GetType().Name}");
|
|
52
|
+
task.Init(coreOption);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public static void Init(TapTapSDKCoreOptions coreOption, TapTapSDKBaseOption[] otherOptions){
|
|
58
|
+
if (coreOption == null)
|
|
59
|
+
throw new ArgumentException("[TapSDK] options is null!");
|
|
60
|
+
if (string.IsNullOrEmpty(coreOption.clientId))
|
|
61
|
+
throw new ArgumentException("[TapSDK] clientID is null or empty!");
|
|
62
|
+
|
|
63
|
+
TapTapSDK.tapTapSDKCoreOptions = coreOption;
|
|
64
|
+
platformWrapper?.Init(coreOption,otherOptions);
|
|
65
|
+
|
|
66
|
+
Type[] initTaskTypes = GetInitTypeList();
|
|
67
|
+
if (initTaskTypes != null) {
|
|
68
|
+
List<IInitTask> initTasks = new List<IInitTask>();
|
|
69
|
+
foreach (Type initTaskType in initTaskTypes) {
|
|
70
|
+
initTasks.Add(Activator.CreateInstance(initTaskType) as IInitTask);
|
|
71
|
+
}
|
|
72
|
+
initTasks = initTasks.OrderBy(task => task.Order).ToList();
|
|
73
|
+
foreach (IInitTask task in initTasks) {
|
|
74
|
+
TapLogger.Debug($"Init: {task.GetType().Name}");
|
|
75
|
+
task.Init(coreOption,otherOptions);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// UpdateLanguage 方法
|
|
81
|
+
public static void UpdateLanguage(TapTapLanguageType language){
|
|
82
|
+
platformWrapper?.UpdateLanguage(language);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
private static Type[] GetInitTypeList(){
|
|
86
|
+
Type interfaceType = typeof(IInitTask);
|
|
87
|
+
Type[] initTaskTypes = AppDomain.CurrentDomain.GetAssemblies()
|
|
88
|
+
.Where(asssembly => asssembly.GetName().FullName.StartsWith("TapSDK"))
|
|
89
|
+
.SelectMany(assembly => assembly.GetTypes())
|
|
90
|
+
.Where(clazz => interfaceType.IsAssignableFrom(clazz) && clazz.IsClass)
|
|
91
|
+
.ToArray();
|
|
92
|
+
return initTaskTypes;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using Newtonsoft.Json;
|
|
3
|
+
|
|
4
|
+
namespace TapSDK.Core
|
|
5
|
+
{
|
|
6
|
+
public interface TapTapSDKBaseOption
|
|
7
|
+
{
|
|
8
|
+
string moduleName { get; }
|
|
9
|
+
|
|
10
|
+
AndroidJavaObject androidObject{get;}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public enum TapTapRegionType
|
|
14
|
+
{
|
|
15
|
+
CN = 0,
|
|
16
|
+
Overseas = 1
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
public enum TapTapLanguageType
|
|
21
|
+
{
|
|
22
|
+
Auto = 0,// 自动
|
|
23
|
+
zh_Hans,// 简体中文
|
|
24
|
+
en,// 英文
|
|
25
|
+
zh_Hant,// 繁体中文
|
|
26
|
+
ja,// 日文
|
|
27
|
+
ko,// 韩文
|
|
28
|
+
th,// 泰文
|
|
29
|
+
id,// 印度尼西亚语
|
|
30
|
+
de,// 德语
|
|
31
|
+
es,// 西班牙语
|
|
32
|
+
fr,// 法语
|
|
33
|
+
pt,// 葡萄牙语
|
|
34
|
+
ru,// 俄罗斯语
|
|
35
|
+
tr,// 土耳其语
|
|
36
|
+
vi// 越南语
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public class TapTapSDKCoreOptions : TapTapSDKBaseOption
|
|
40
|
+
{
|
|
41
|
+
/// <summary>
|
|
42
|
+
/// 客户端 ID,开发者后台获取
|
|
43
|
+
/// </summary>
|
|
44
|
+
public string clientId;
|
|
45
|
+
/// <summary>
|
|
46
|
+
/// 客户端令牌,开发者后台获取
|
|
47
|
+
/// </summary>
|
|
48
|
+
public string clientToken;
|
|
49
|
+
/// <summary>
|
|
50
|
+
/// 地区,CN 为国内,Overseas 为海外
|
|
51
|
+
/// </summary>
|
|
52
|
+
public TapTapRegionType region = TapTapRegionType.CN;
|
|
53
|
+
/// <summary>
|
|
54
|
+
/// 语言,默认为 Auto,默认情况下,国内为 zh_Hans,海外为 en
|
|
55
|
+
/// </summary>
|
|
56
|
+
public TapTapLanguageType preferredLanguage = TapTapLanguageType.Auto;
|
|
57
|
+
/// <summary>
|
|
58
|
+
/// 渠道,如 AppStore、GooglePlay
|
|
59
|
+
/// </summary>
|
|
60
|
+
public string channel = null;
|
|
61
|
+
/// <summary>
|
|
62
|
+
/// 游戏版本号,如果不传则默认读取应用的版本号
|
|
63
|
+
/// </summary>
|
|
64
|
+
public string gameVersion = null;
|
|
65
|
+
/// <summary>
|
|
66
|
+
/// 初始化时传入的自定义参数,会在初始化时上报到 device_login 事件
|
|
67
|
+
/// </summary>
|
|
68
|
+
public string propertiesJson = null;
|
|
69
|
+
/// <summary>
|
|
70
|
+
/// CAID,仅国内 iOS
|
|
71
|
+
/// </summary>
|
|
72
|
+
public string caid = null;
|
|
73
|
+
/// <summary>
|
|
74
|
+
/// 是否能够覆盖内置参数,默认为 false
|
|
75
|
+
/// </summary>
|
|
76
|
+
public bool overrideBuiltInParameters = false;
|
|
77
|
+
/// <summary>
|
|
78
|
+
/// 是否开启广告商 ID 收集,默认为 false
|
|
79
|
+
/// </summary>
|
|
80
|
+
public bool enableAdvertiserIDCollection = false;
|
|
81
|
+
/// <summary>
|
|
82
|
+
/// 是否开启自动上报 IAP 事件
|
|
83
|
+
/// </summary>
|
|
84
|
+
public bool enableAutoIAPEvent = true;
|
|
85
|
+
/// <summary>
|
|
86
|
+
/// OAID证书, 仅 Android,用于上报 OAID 仅 [TapTapRegion.CN] 生效
|
|
87
|
+
/// </summary>
|
|
88
|
+
public string oaidCert = null;
|
|
89
|
+
/// <summary>
|
|
90
|
+
/// 是否开启日志,Release 版本请设置为 false
|
|
91
|
+
/// </summary>
|
|
92
|
+
public bool enableLog = false;
|
|
93
|
+
|
|
94
|
+
[JsonProperty("moduleName")]
|
|
95
|
+
private string _moduleName = "TapTapSDKCore";
|
|
96
|
+
[JsonIgnore]
|
|
97
|
+
public string moduleName
|
|
98
|
+
{
|
|
99
|
+
get => _moduleName;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
public AndroidJavaObject androidObject => throw new System.NotImplementedException();
|
|
103
|
+
}
|
|
104
|
+
}
|
package/Runtime.meta
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using UnityEditor.Build.Reporting;
|
|
3
|
+
using TapSDK.Core.Editor;
|
|
4
|
+
|
|
5
|
+
namespace TapSDK.Core.Editor {
|
|
6
|
+
public class TapCoreStandaloneProcessBuild : SDKLinkProcessBuild {
|
|
7
|
+
public override int callbackOrder => 0;
|
|
8
|
+
|
|
9
|
+
public override string LinkPath => "TapSDK/Core/link.xml";
|
|
10
|
+
|
|
11
|
+
public override LinkedAssembly[] LinkedAssemblies => new LinkedAssembly[] {
|
|
12
|
+
new LinkedAssembly { Fullname = "TapSDK.Core.Runtime" },
|
|
13
|
+
new LinkedAssembly { Fullname = "TapSDK.Core.Standalone.Runtime" }
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
public override Func<BuildReport, bool> IsTargetPlatform => (report) => {
|
|
17
|
+
return BuildTargetUtils.IsSupportStandalone(report.summary.platform);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TapSDK.Core.Standalone.Editor",
|
|
3
|
+
"references": [
|
|
4
|
+
"GUID:56f3da7a178484843974054bafe77e73"
|
|
5
|
+
],
|
|
6
|
+
"includePlatforms": [
|
|
7
|
+
"Editor"
|
|
8
|
+
],
|
|
9
|
+
"excludePlatforms": [],
|
|
10
|
+
"allowUnsafeCode": false,
|
|
11
|
+
"overrideReferences": false,
|
|
12
|
+
"precompiledReferences": [],
|
|
13
|
+
"autoReferenced": true,
|
|
14
|
+
"defineConstraints": [],
|
|
15
|
+
"versionDefines": [],
|
|
16
|
+
"noEngineReferences": false
|
|
17
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>BuildMachineOSBuild</key>
|
|
6
|
+
<string>22D68</string>
|
|
7
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
8
|
+
<string>en</string>
|
|
9
|
+
<key>CFBundleExecutable</key>
|
|
10
|
+
<string>TapDBDeviceInfo</string>
|
|
11
|
+
<key>CFBundleIdentifier</key>
|
|
12
|
+
<string>com.tap.TapDBDeviceInfo</string>
|
|
13
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
14
|
+
<string>6.0</string>
|
|
15
|
+
<key>CFBundleName</key>
|
|
16
|
+
<string>TapDBDeviceInfo</string>
|
|
17
|
+
<key>CFBundlePackageType</key>
|
|
18
|
+
<string>BNDL</string>
|
|
19
|
+
<key>CFBundleShortVersionString</key>
|
|
20
|
+
<string>1.0</string>
|
|
21
|
+
<key>CFBundleSupportedPlatforms</key>
|
|
22
|
+
<array>
|
|
23
|
+
<string>MacOSX</string>
|
|
24
|
+
</array>
|
|
25
|
+
<key>CFBundleVersion</key>
|
|
26
|
+
<string>1</string>
|
|
27
|
+
<key>DTCompiler</key>
|
|
28
|
+
<string>com.apple.compilers.llvm.clang.1_0</string>
|
|
29
|
+
<key>DTPlatformBuild</key>
|
|
30
|
+
<string>14C18</string>
|
|
31
|
+
<key>DTPlatformName</key>
|
|
32
|
+
<string>macosx</string>
|
|
33
|
+
<key>DTPlatformVersion</key>
|
|
34
|
+
<string>13.1</string>
|
|
35
|
+
<key>DTSDKBuild</key>
|
|
36
|
+
<string>22C55</string>
|
|
37
|
+
<key>DTSDKName</key>
|
|
38
|
+
<string>macosx13.1</string>
|
|
39
|
+
<key>DTXcode</key>
|
|
40
|
+
<string>1420</string>
|
|
41
|
+
<key>DTXcodeBuild</key>
|
|
42
|
+
<string>14C18</string>
|
|
43
|
+
<key>LSMinimumSystemVersion</key>
|
|
44
|
+
<string>13.1</string>
|
|
45
|
+
</dict>
|
|
46
|
+
</plist>
|
|
Binary file
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>files</key>
|
|
6
|
+
<dict/>
|
|
7
|
+
<key>files2</key>
|
|
8
|
+
<dict/>
|
|
9
|
+
<key>rules</key>
|
|
10
|
+
<dict>
|
|
11
|
+
<key>^Resources/</key>
|
|
12
|
+
<true/>
|
|
13
|
+
<key>^Resources/.*\.lproj/</key>
|
|
14
|
+
<dict>
|
|
15
|
+
<key>optional</key>
|
|
16
|
+
<true/>
|
|
17
|
+
<key>weight</key>
|
|
18
|
+
<real>1000</real>
|
|
19
|
+
</dict>
|
|
20
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
21
|
+
<dict>
|
|
22
|
+
<key>omit</key>
|
|
23
|
+
<true/>
|
|
24
|
+
<key>weight</key>
|
|
25
|
+
<real>1100</real>
|
|
26
|
+
</dict>
|
|
27
|
+
<key>^Resources/Base\.lproj/</key>
|
|
28
|
+
<dict>
|
|
29
|
+
<key>weight</key>
|
|
30
|
+
<real>1010</real>
|
|
31
|
+
</dict>
|
|
32
|
+
<key>^version.plist$</key>
|
|
33
|
+
<true/>
|
|
34
|
+
</dict>
|
|
35
|
+
<key>rules2</key>
|
|
36
|
+
<dict>
|
|
37
|
+
<key>.*\.dSYM($|/)</key>
|
|
38
|
+
<dict>
|
|
39
|
+
<key>weight</key>
|
|
40
|
+
<real>11</real>
|
|
41
|
+
</dict>
|
|
42
|
+
<key>^(.*/)?\.DS_Store$</key>
|
|
43
|
+
<dict>
|
|
44
|
+
<key>omit</key>
|
|
45
|
+
<true/>
|
|
46
|
+
<key>weight</key>
|
|
47
|
+
<real>2000</real>
|
|
48
|
+
</dict>
|
|
49
|
+
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
|
50
|
+
<dict>
|
|
51
|
+
<key>nested</key>
|
|
52
|
+
<true/>
|
|
53
|
+
<key>weight</key>
|
|
54
|
+
<real>10</real>
|
|
55
|
+
</dict>
|
|
56
|
+
<key>^.*</key>
|
|
57
|
+
<true/>
|
|
58
|
+
<key>^Info\.plist$</key>
|
|
59
|
+
<dict>
|
|
60
|
+
<key>omit</key>
|
|
61
|
+
<true/>
|
|
62
|
+
<key>weight</key>
|
|
63
|
+
<real>20</real>
|
|
64
|
+
</dict>
|
|
65
|
+
<key>^PkgInfo$</key>
|
|
66
|
+
<dict>
|
|
67
|
+
<key>omit</key>
|
|
68
|
+
<true/>
|
|
69
|
+
<key>weight</key>
|
|
70
|
+
<real>20</real>
|
|
71
|
+
</dict>
|
|
72
|
+
<key>^Resources/</key>
|
|
73
|
+
<dict>
|
|
74
|
+
<key>weight</key>
|
|
75
|
+
<real>20</real>
|
|
76
|
+
</dict>
|
|
77
|
+
<key>^Resources/.*\.lproj/</key>
|
|
78
|
+
<dict>
|
|
79
|
+
<key>optional</key>
|
|
80
|
+
<true/>
|
|
81
|
+
<key>weight</key>
|
|
82
|
+
<real>1000</real>
|
|
83
|
+
</dict>
|
|
84
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
85
|
+
<dict>
|
|
86
|
+
<key>omit</key>
|
|
87
|
+
<true/>
|
|
88
|
+
<key>weight</key>
|
|
89
|
+
<real>1100</real>
|
|
90
|
+
</dict>
|
|
91
|
+
<key>^Resources/Base\.lproj/</key>
|
|
92
|
+
<dict>
|
|
93
|
+
<key>weight</key>
|
|
94
|
+
<real>1010</real>
|
|
95
|
+
</dict>
|
|
96
|
+
<key>^[^/]+$</key>
|
|
97
|
+
<dict>
|
|
98
|
+
<key>nested</key>
|
|
99
|
+
<true/>
|
|
100
|
+
<key>weight</key>
|
|
101
|
+
<real>10</real>
|
|
102
|
+
</dict>
|
|
103
|
+
<key>^embedded\.provisionprofile$</key>
|
|
104
|
+
<dict>
|
|
105
|
+
<key>weight</key>
|
|
106
|
+
<real>20</real>
|
|
107
|
+
</dict>
|
|
108
|
+
<key>^version\.plist$</key>
|
|
109
|
+
<dict>
|
|
110
|
+
<key>weight</key>
|
|
111
|
+
<real>20</real>
|
|
112
|
+
</dict>
|
|
113
|
+
</dict>
|
|
114
|
+
</dict>
|
|
115
|
+
</plist>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 3b398345a81614ec48f4f2c0b7b1694a
|
|
3
|
+
PluginImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
iconMap: {}
|
|
7
|
+
executionOrder: {}
|
|
8
|
+
defineConstraints: []
|
|
9
|
+
isPreloaded: 0
|
|
10
|
+
isOverridable: 0
|
|
11
|
+
isExplicitlyReferenced: 0
|
|
12
|
+
validateReferences: 1
|
|
13
|
+
platformData:
|
|
14
|
+
- first:
|
|
15
|
+
Any:
|
|
16
|
+
second:
|
|
17
|
+
enabled: 0
|
|
18
|
+
settings: {}
|
|
19
|
+
- first:
|
|
20
|
+
Editor: Editor
|
|
21
|
+
second:
|
|
22
|
+
enabled: 1
|
|
23
|
+
settings:
|
|
24
|
+
DefaultValueInitialized: true
|
|
25
|
+
- first:
|
|
26
|
+
Standalone: OSXUniversal
|
|
27
|
+
second:
|
|
28
|
+
enabled: 1
|
|
29
|
+
settings:
|
|
30
|
+
CPU: AnyCPU
|
|
31
|
+
userData:
|
|
32
|
+
assetBundleName:
|
|
33
|
+
assetBundleVariant:
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
namespace TapSDK.Core.Standalone.Internal {
|
|
3
|
+
public static class Constants {
|
|
4
|
+
public static readonly string EVENT = "event";
|
|
5
|
+
|
|
6
|
+
public static readonly string PROPERTY_INITIALIZE_TYPE = "initialise";
|
|
7
|
+
public static readonly string PROPERTY_UPDATE_TYPE = "update";
|
|
8
|
+
public static readonly string PROPERTY_ADD_TYPE = "add";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
public readonly static string SERVER_URL_BJ = "https://e.tapdb.net/v2";
|
|
12
|
+
public readonly static string SERVER_URL_SG = "https://e.tapdb.ap-sg.tapapis.com/v2";
|
|
13
|
+
public readonly static string DEVICE_LOGIN = "device_login";
|
|
14
|
+
public readonly static string USER_LOGIN = "user_login";
|
|
15
|
+
|
|
16
|
+
internal static string ClientSettingsFileName = "TapSDKClientSettings.json";
|
|
17
|
+
internal static string ClientSettingsEventKey = "ClientSettingsEventKey";
|
|
18
|
+
|
|
19
|
+
public static string TAPSDK_HOST {
|
|
20
|
+
get {
|
|
21
|
+
if (TapCoreStandalone.isRnd) {
|
|
22
|
+
if (TapCoreStandalone.coreOptions.region == TapTapRegionType.CN)
|
|
23
|
+
return "https://tapsdk.api.xdrnd.cn";
|
|
24
|
+
else
|
|
25
|
+
return "https://tapsdk.api.xdrnd.com";
|
|
26
|
+
} else {
|
|
27
|
+
if (TapCoreStandalone.coreOptions.region == TapTapRegionType.CN)
|
|
28
|
+
return "https://tapsdk.tapapis.cn";
|
|
29
|
+
else
|
|
30
|
+
return "https://tapsdk.tapapis.com";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
}
|