com.xd.sdk.common 0.0.10-alpha → 0.0.13-alpha

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.
Files changed (29) hide show
  1. package/Editor/iOS/XDGIOSCommonProcessor.cs +13 -2
  2. package/Plugins/Android/libs/XDGBridgeCommon_v7_7.0.0.aar +0 -0
  3. package/Plugins/Android/libs/XDGBridgeCommon_v7_7.0.0.aar.meta +32 -0
  4. package/Plugins/Android/libs/XDGCommon_7.0.0.aar +0 -0
  5. package/Plugins/Android/libs/XDGTapTapWrapperInternal_7.0.0.aar +0 -0
  6. package/Plugins/Android/libs/XDGTapTapWrapperInternal_7.0.0.aar.meta +32 -0
  7. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGConfig.h +2 -0
  8. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGThirdSDKHelper.h +3 -0
  9. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDTapTapInfo.h +6 -0
  10. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDVersion.h +1 -1
  11. package/Plugins/iOS/XDCommonSDK.framework/XDCommonSDK +0 -0
  12. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Headers/XDTapSDK4WrapperSDK.h +4 -0
  13. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Info.plist +0 -0
  14. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  15. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/XDTapSDK4WrapperSDK +0 -0
  16. package/Plugins/iOS/XDTapSDK4WrapperSDK.framework.meta +17 -16
  17. package/Runtime/Internal/Events/XDGEvents.cs +2 -1
  18. package/Runtime/Internal/Mobile/Bridge/BridgeConstants.cs +20 -16
  19. package/Runtime/Internal/Mobile/CommonFeaturesImpl.cs +15 -15
  20. package/Runtime/Internal/Standalone/CommonFeaturesImpl.cs +17 -13
  21. package/Runtime/Internal/Standalone/Config/AntiConfig.cs +28 -0
  22. package/Runtime/Internal/Standalone/Config/AntiConfig.cs.meta +3 -0
  23. package/Runtime/Internal/Standalone/Config/AppConfig.cs +10 -6
  24. package/Runtime/Internal/Standalone/Config/Config.cs +2 -0
  25. package/Runtime/Internal/Standalone/Config/ConfigModule.cs +30 -0
  26. package/link.xml +2 -11
  27. package/package.json +2 -2
  28. package/Runtime/Internal/XDGTapSDK.cs +0 -107
  29. package/Runtime/Internal/XDGTapSDK.cs.meta +0 -3
@@ -139,6 +139,10 @@ namespace XD.SDK.Common.Editor
139
139
  // 拷贝 mainland 资源
140
140
  CopyResource(target, projPath, proj, parentFolder,
141
141
  "com.xd.sdk.mainland", "Mainland", resourcePath);
142
+
143
+ // 拷贝 TapSDKPlus 资源
144
+ CopyResource(target, projPath, proj, parentFolder,
145
+ "com.xd.sdk.tap.plus", "", resourcePath, true);
142
146
 
143
147
  // 拷贝外面配置的文件夹
144
148
  CopyThirdResource(target, projPath, proj, parentFolder, resourcePath);
@@ -207,7 +211,7 @@ namespace XD.SDK.Common.Editor
207
211
  }
208
212
 
209
213
  private static void CopyResource(string mainTargetGuid, string projPath, PBXProject proj, string dataPath,
210
- string npmModuleName, string localModuleName, string xcodeResourceFolder)
214
+ string npmModuleName, string localModuleName, string xcodeResourceFolder, bool tapResource=false)
211
215
  {
212
216
  // 拷贝文件夹里的资源
213
217
  var moduleIOSResourcesFolder = FilterFile(dataPath + "/Library/PackageCache/", $"{npmModuleName}@");
@@ -219,7 +223,14 @@ namespace XD.SDK.Common.Editor
219
223
  if (string.IsNullOrEmpty(moduleIOSResourcesFolder))
220
224
  {
221
225
  // 用本地的路径
222
- moduleIOSResourcesFolder = dataPath + "/SDK/XD/SDK/" + localModuleName;
226
+ if (tapResource)
227
+ {
228
+ moduleIOSResourcesFolder = dataPath + "/SDK/TapPlus";
229
+ }
230
+ else
231
+ {
232
+ moduleIOSResourcesFolder = dataPath + "/SDK/XD/SDK/" + localModuleName;
233
+ }
223
234
  }
224
235
 
225
236
  // 没有的话,换个路径试试
@@ -0,0 +1,32 @@
1
+ fileFormatVersion: 2
2
+ guid: 02e9172d96dbc455c825085a557719d3
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints: []
9
+ isPreloaded: 0
10
+ isOverridable: 1
11
+ isExplicitlyReferenced: 0
12
+ validateReferences: 1
13
+ platformData:
14
+ - first:
15
+ Android: Android
16
+ second:
17
+ enabled: 1
18
+ settings: {}
19
+ - first:
20
+ Any:
21
+ second:
22
+ enabled: 0
23
+ settings: {}
24
+ - first:
25
+ Editor: Editor
26
+ second:
27
+ enabled: 0
28
+ settings:
29
+ DefaultValueInitialized: true
30
+ userData:
31
+ assetBundleName:
32
+ assetBundleVariant:
@@ -0,0 +1,32 @@
1
+ fileFormatVersion: 2
2
+ guid: 9b0d403d67c154f328438456187fd373
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints: []
9
+ isPreloaded: 0
10
+ isOverridable: 1
11
+ isExplicitlyReferenced: 0
12
+ validateReferences: 1
13
+ platformData:
14
+ - first:
15
+ Android: Android
16
+ second:
17
+ enabled: 1
18
+ settings: {}
19
+ - first:
20
+ Any:
21
+ second:
22
+ enabled: 0
23
+ settings: {}
24
+ - first:
25
+ Editor: Editor
26
+ second:
27
+ enabled: 0
28
+ settings:
29
+ DefaultValueInitialized: true
30
+ userData:
31
+ assetBundleName:
32
+ assetBundleVariant:
@@ -105,6 +105,8 @@ typedef NS_ENUM(NSInteger, XDSDKRegionType) {
105
105
  @property (nonatomic, strong) NSArray *webWhiteList;
106
106
  /// 自动注册推送
107
107
  @property (nonatomic, assign) BOOL pushAutoInit;
108
+ /// 关闭客服
109
+ @property (nonatomic, assign) BOOL disableSupport;
108
110
 
109
111
  - (BOOL)isCN;
110
112
 
@@ -9,6 +9,9 @@
9
9
 
10
10
  NS_ASSUME_NONNULL_BEGIN
11
11
 
12
+ extern NSString *const kXDGAppsFlyer;
13
+ extern NSString *const kXDGFirebase;
14
+
12
15
  @interface XDGThirdSDKHelper : NSObject
13
16
 
14
17
  + (NSString *)TapSDKWrapper;
@@ -16,6 +16,12 @@ NS_ASSUME_NONNULL_BEGIN
16
16
  @property (nonatomic, assign) BOOL useAgeRange;
17
17
  /// 是否显示切换账号,默认显示
18
18
  @property (nonatomic, assign) BOOL showSwitchAccount;
19
+ /// 适龄限制弹窗标题
20
+ @property (nonatomic, copy) NSString *ageLimitTitle;
21
+ /// 适龄限制弹窗内容
22
+ @property (nonatomic, copy) NSString *ageLimitContent;
23
+ /// 适龄限制弹窗按钮文案
24
+ @property (nonatomic, copy) NSString *ageLimitConfirm;
19
25
 
20
26
  @end
21
27
 
@@ -7,4 +7,4 @@
7
7
 
8
8
  #define XDSDK_VERSION @"7.0.0"
9
9
  #define XDSDK_VERSION_CODE @"7000000"
10
- // HASH 7f0303a
10
+ // HASH 8bd7e79
@@ -14,3 +14,7 @@ FOUNDATION_EXPORT double XDTapSDK4WrapperSDKVersionNumber;
14
14
  FOUNDATION_EXPORT const unsigned char XDTapSDK4WrapperSDKVersionString[];
15
15
 
16
16
  // In this header, you should import all the public headers of your framework using statements like #import <XDTapSDK4WrapperSDK/PublicHeader.h>
17
+
18
+ #define XDGTapSDK4_VERSION @"7.0.0"
19
+ #define XDGTapSDK4_VERSION_CODE @"7000000"
20
+ // HASH 8bd7e79
@@ -1,5 +1,6 @@
1
1
  fileFormatVersion: 2
2
2
  guid: 6e1e21296cd346c889f31ab80c0797ca
3
+ folderAsset: yes
3
4
  PluginImporter:
4
5
  externalObjects: {}
5
6
  serializedVersion: 2
@@ -16,29 +17,29 @@ PluginImporter:
16
17
  second:
17
18
  enabled: 0
18
19
  settings:
19
- Exclude Android: 0
20
- Exclude Editor: 0
21
- Exclude Linux64: 0
22
- Exclude OSXUniversal: 0
23
- Exclude Win: 0
24
- Exclude Win64: 0
20
+ Exclude Android: 1
21
+ Exclude Editor: 1
22
+ Exclude Linux64: 1
23
+ Exclude OSXUniversal: 1
24
+ Exclude Win: 1
25
+ Exclude Win64: 1
25
26
  Exclude iOS: 0
26
27
  - first:
27
28
  Android: Android
28
29
  second:
29
- enabled: 1
30
+ enabled: 0
30
31
  settings:
31
32
  AndroidSharedLibraryType: Executable
32
33
  CPU: ARMv7
33
34
  - first:
34
35
  Any:
35
36
  second:
36
- enabled: 1
37
+ enabled: 0
37
38
  settings: {}
38
39
  - first:
39
40
  Editor: Editor
40
41
  second:
41
- enabled: 1
42
+ enabled: 0
42
43
  settings:
43
44
  CPU: AnyCPU
44
45
  DefaultValueInitialized: true
@@ -46,27 +47,27 @@ PluginImporter:
46
47
  - first:
47
48
  Standalone: Linux64
48
49
  second:
49
- enabled: 1
50
+ enabled: 0
50
51
  settings:
51
- CPU: x86_64
52
+ CPU: None
52
53
  - first:
53
54
  Standalone: OSXUniversal
54
55
  second:
55
- enabled: 1
56
+ enabled: 0
56
57
  settings:
57
58
  CPU: None
58
59
  - first:
59
60
  Standalone: Win
60
61
  second:
61
- enabled: 1
62
+ enabled: 0
62
63
  settings:
63
- CPU: x86
64
+ CPU: None
64
65
  - first:
65
66
  Standalone: Win64
66
67
  second:
67
- enabled: 1
68
+ enabled: 0
68
69
  settings:
69
- CPU: x86_64
70
+ CPU: None
70
71
  - first:
71
72
  iPhone: iOS
72
73
  second:
@@ -6,6 +6,7 @@ namespace XD.SDK.Common.Internal.Events
6
6
 
7
7
  public const string AccountGetCurrentUser = "Account.GetCurrentUser";
8
8
  public const string AccountGetAccessToken = "Account.GetAccessToken";
9
+ public const string AccountSupportStartPolling = "Account.SupportStartPolling";
9
10
 
10
11
  #endregion
11
12
 
@@ -61,7 +62,7 @@ namespace XD.SDK.Common.Internal.Events
61
62
  public const string TdsSDKGetUser = "TDSSDK.GetUser";
62
63
  public const string TdsSDKSyncFacebookToken = "TDSSDK.SyncFacebookToken";
63
64
  public const string TdsSDKRefreshFacebookTime = "TDSSDK.RefreshFacebookTime";
64
-
65
+
65
66
  #endregion
66
67
 
67
68
  #region SDK Status Events
@@ -9,37 +9,41 @@ namespace XD.SDK.Common.Internal.Mobile.Bridge
9
9
 
10
10
  public static class Common
11
11
  {
12
- public const string BRIDGE_NAME = "XDGBridgeCommon";
13
- public const string SERVICE_NAME = "com.xd.sdk.common.bridge.BridgeCommon";
14
- public const string SERVICE_IMPL = "com.xd.sdk.common.bridge.BridgeCommonImpl";
12
+ public const string BridgeName = "XDGBridgeCommon";
13
+ public const string ServiceName = "com.xd.sdk.common.bridge.BridgeCommon";
14
+ public const string ServiceImpl = "com.xd.sdk.common.bridge.BridgeCommonImpl";
15
+
16
+ public const string BridgeStaticImpl = "com.xd.sdk.common.bridge.CommonImpl";
15
17
  }
16
18
 
17
19
  public static class Account
18
20
  {
19
- public const string BRIDGE_NAME = "XDGBridgeAccount";
20
- public const string SERVICE_NAME = "com.xd.sdk.account.bridge.BridgeAccount";
21
- public const string SERVICE_IMPL = "com.xd.sdk.account.bridge.BridgeAccountImpl";
21
+ public const string BridgeName = "XDGBridgeAccount";
22
+ public const string ServiceName = "com.xd.sdk.account.bridge.BridgeAccount";
23
+ public const string ServiceImpl = "com.xd.sdk.account.bridge.BridgeAccountImpl";
24
+
25
+ public const string BridgeStaticImpl = "com.xd.sdk.account.bridge.AccountImpl";
22
26
  }
23
27
 
24
28
  public static class Payment
25
29
  {
26
- public const string BRIDGE_NAME = "XDGBridgePayment";
27
- public const string SERVICE_NAME = "com.xd.sdk.payment.bridge.BridgePayment";
28
- public const string SERVICE_IMPL = "com.xd.sdk.payment.bridge.BridgePaymentImpl";
30
+ public const string BridgeName = "XDGBridgePayment";
31
+ public const string ServiceName = "com.xd.sdk.payment.bridge.BridgePayment";
32
+ public const string ServiceImpl = "com.xd.sdk.payment.bridge.BridgePaymentImpl";
29
33
  }
30
34
 
31
35
  public static class Share
32
36
  {
33
- public const string BRIDGE_NAME = "XDGBridgeSharing";
34
- public const string SERVICE_NAME = "com.xd.sdk.sharing.bridge.BridgeSharing";
35
- public const string SERVICE_IMPL = "com.xd.sdk.sharing.bridge.BridgeSharingImpl";
37
+ public const string BridgeName = "XDGBridgeSharing";
38
+ public const string ServiceName = "com.xd.sdk.sharing.bridge.BridgeSharing";
39
+ public const string ServiceImpl = "com.xd.sdk.sharing.bridge.BridgeSharingImpl";
36
40
  }
37
-
41
+
38
42
  public static class Push
39
43
  {
40
- public const string BRIDGE_NAME = "XDGBridgePush";
41
- public const string SERVICE_NAME = "com.xd.sdk.push.bridge.BridgePush";
42
- public const string SERVICE_IMPL = "com.xd.sdk.push.bridge.BridgePushImpl";
44
+ public const string BridgeName = "XDGBridgePush";
45
+ public const string ServiceName = "com.xd.sdk.push.bridge.BridgePush";
46
+ public const string ServiceImpl = "com.xd.sdk.push.bridge.BridgePushImpl";
43
47
  }
44
48
  }
45
49
  }
@@ -38,13 +38,13 @@ namespace XD.SDK.Common.Internal.Mobile
38
38
  private CommonFeaturesImpl()
39
39
  {
40
40
  EngineBridge.GetInstance()
41
- .Register(BridgeConstants.Common.SERVICE_NAME, BridgeConstants.Common.SERVICE_IMPL);
41
+ .Register(BridgeConstants.Common.ServiceName, BridgeConstants.Common.ServiceImpl);
42
42
  }
43
43
 
44
44
  public void InitSDK(XDGInitParam param, Action<bool, string> callback)
45
45
  {
46
46
  var command = new Command.Builder()
47
- .Service(BridgeConstants.Common.BRIDGE_NAME)
47
+ .Service(BridgeConstants.Common.BridgeName)
48
48
  .Method("initSDK")
49
49
  .Args(XDUtility.BridgeArgToDictionary("initSDK", param))
50
50
  .Callback(true)
@@ -81,7 +81,7 @@ namespace XD.SDK.Common.Internal.Mobile
81
81
  {
82
82
  string config = null;
83
83
  #if UNITY_ANDROID
84
- using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.SERVICE_IMPL))
84
+ using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.BridgeStaticImpl))
85
85
  {
86
86
  config = commonBridgeClass.CallStatic<string>("getTapSDKConfig");
87
87
  }
@@ -114,7 +114,7 @@ namespace XD.SDK.Common.Internal.Mobile
114
114
  using (var unityPlayerClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
115
115
  {
116
116
  var currentActivity = unityPlayerClass.GetStatic<AndroidJavaObject>("currentActivity");
117
- using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.SERVICE_IMPL))
117
+ using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.BridgeStaticImpl))
118
118
  {
119
119
  commonBridgeClass.CallStatic("setGameActivity", currentActivity);
120
120
  }
@@ -125,7 +125,7 @@ namespace XD.SDK.Common.Internal.Mobile
125
125
  public bool IsInitialized()
126
126
  {
127
127
  #if UNITY_ANDROID
128
- using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.SERVICE_IMPL))
128
+ using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.BridgeStaticImpl))
129
129
  {
130
130
  return commonBridgeClass.CallStatic<bool>("isInitialized");
131
131
  }
@@ -145,7 +145,7 @@ namespace XD.SDK.Common.Internal.Mobile
145
145
  {
146
146
  XDGLogger.Debug("===> SetLanguage langType: " + langType);
147
147
  var command = new Command.Builder()
148
- .Service(BridgeConstants.Common.BRIDGE_NAME)
148
+ .Service(BridgeConstants.Common.BridgeName)
149
149
  .Method("setLanguage")
150
150
  .Args("langType", (int)langType)
151
151
  .OnceTime(true)
@@ -156,7 +156,7 @@ namespace XD.SDK.Common.Internal.Mobile
156
156
  public void StoreReview()
157
157
  {
158
158
  var command = new Command.Builder()
159
- .Service(BridgeConstants.Common.BRIDGE_NAME)
159
+ .Service(BridgeConstants.Common.BridgeName)
160
160
  .Method("storeReview")
161
161
  .OnceTime(true)
162
162
  .CommandBuilder();
@@ -167,7 +167,7 @@ namespace XD.SDK.Common.Internal.Mobile
167
167
  public void TrackRole(XDGRoleInfo role)
168
168
  {
169
169
  var command = new Command.Builder()
170
- .Service(BridgeConstants.Common.BRIDGE_NAME)
170
+ .Service(BridgeConstants.Common.BridgeName)
171
171
  .Method("trackRole")
172
172
  .Args(XDUtility.BridgeArgToDictionary("trackRole", role))
173
173
  .OnceTime(true)
@@ -178,7 +178,7 @@ namespace XD.SDK.Common.Internal.Mobile
178
178
  public void TrackEvent(string eventName, Dictionary<string, object> properties = null)
179
179
  {
180
180
  var command = new Command.Builder()
181
- .Service(BridgeConstants.Common.BRIDGE_NAME)
181
+ .Service(BridgeConstants.Common.BridgeName)
182
182
  .Method("trackEvent")
183
183
  .Args("eventName", eventName)
184
184
  .Args("properties", properties)
@@ -191,7 +191,7 @@ namespace XD.SDK.Common.Internal.Mobile
191
191
  public void PreloadWebPage(string url)
192
192
  {
193
193
  var command = new Command.Builder()
194
- .Service(BridgeConstants.Common.BRIDGE_NAME)
194
+ .Service(BridgeConstants.Common.BridgeName)
195
195
  .Method("preload")
196
196
  .Args("preload", url)
197
197
  .OnceTime(true)
@@ -203,7 +203,7 @@ namespace XD.SDK.Common.Internal.Mobile
203
203
  {
204
204
  XDGLogger.Debug("[unity 打开 Web Url:");
205
205
  var command = new Command.Builder()
206
- .Service(BridgeConstants.Common.BRIDGE_NAME)
206
+ .Service(BridgeConstants.Common.BridgeName)
207
207
  .Method("openWebPage")
208
208
  .Args("openWebPage", url)
209
209
  .Callback(true)
@@ -235,7 +235,7 @@ namespace XD.SDK.Common.Internal.Mobile
235
235
  public bool IsCn()
236
236
  {
237
237
  #if UNITY_ANDROID
238
- using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.SERVICE_IMPL))
238
+ using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.BridgeStaticImpl))
239
239
  {
240
240
  return commonBridgeClass.CallStatic<bool>("isCN");
241
241
  }
@@ -254,7 +254,7 @@ namespace XD.SDK.Common.Internal.Mobile
254
254
  {
255
255
  string fullUrl;
256
256
  #if UNITY_ANDROID
257
- using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.SERVICE_IMPL))
257
+ using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.BridgeStaticImpl))
258
258
  {
259
259
  fullUrl = commonBridgeClass.CallStatic<string>("buildRequestUrlString", url, timestamp);
260
260
  }
@@ -276,7 +276,7 @@ namespace XD.SDK.Common.Internal.Mobile
276
276
  public void SetTargetCountryOrRegion(string countryOrRegion)
277
277
  {
278
278
  #if UNITY_ANDROID
279
- using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.SERVICE_IMPL))
279
+ using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.BridgeStaticImpl))
280
280
  {
281
281
  commonBridgeClass.CallStatic("setTargetCountryOrRegion", countryOrRegion);
282
282
  }
@@ -293,7 +293,7 @@ namespace XD.SDK.Common.Internal.Mobile
293
293
  public void DisableAgreementUI()
294
294
  {
295
295
  #if UNITY_ANDROID
296
- using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.SERVICE_IMPL))
296
+ using (var commonBridgeClass = new AndroidJavaClass(BridgeConstants.Common.BridgeStaticImpl))
297
297
  {
298
298
  commonBridgeClass.CallStatic("disableAgreementUI");
299
299
  }
@@ -171,6 +171,7 @@ namespace XD.SDK.Common.Internal.Standalone
171
171
  try
172
172
  {
173
173
  SetLanguage(param.Lang);
174
+
174
175
  ConfigModule.LoadConfig(param);
175
176
 
176
177
  AliyunTrack.Init();
@@ -180,15 +181,18 @@ namespace XD.SDK.Common.Internal.Standalone
180
181
  _ = ConfigModule.FetchConfig();
181
182
 
182
183
  _ = XDGAreaCode.FetchAreaCodes();
183
-
184
+
184
185
  IPInfoModule.RequestIpInfoAndSave();
185
186
 
186
187
  InitTap(param);
187
188
 
188
189
  //TODO 注册防沉迷回调
189
190
  RegisterTapComplianceCallback();
190
-
191
+ //TODO 初始化客服
192
+ InitSupportModule();
193
+ // TODO UA 设置因为 WebView Demo 得提前设置,所有后续需要改造
191
194
  InitWebViewUa();
195
+
192
196
  isInited = true;
193
197
  }
194
198
  catch (Exception e)
@@ -206,13 +210,15 @@ namespace XD.SDK.Common.Internal.Standalone
206
210
  {
207
211
  var tapConfig = ConfigModule.TapConfig;
208
212
 
209
- XDGEventBus.Publish(XDGEvents.TapSDKInit, tapConfig.ClientId,
213
+ XDGEventBus.Publish(XDGEvents.TapSDKInit,
214
+ tapConfig.ClientId,
210
215
  tapConfig.ClientToken,
211
216
  initParam.Lang.FormatToXDLangString(),
212
217
  ConfigModule.IsGlobal,
213
218
  true, // enableLog - TODO: 根据配置判断
214
219
  tapConfig.DBConfig.Enable,
215
- GetChannel(tapConfig.DBConfig.Channel));
220
+ GetChannel(tapConfig.DBConfig.Channel),
221
+ ConfigModule.Anti);
216
222
 
217
223
  XDGEventBus.Publish(XDGEvents.TdsSDKInit, tapConfig.ClientId,
218
224
  tapConfig.ClientToken,
@@ -233,14 +239,12 @@ namespace XD.SDK.Common.Internal.Standalone
233
239
 
234
240
  private static void RegisterTapComplianceCallback()
235
241
  {
236
- try
237
- {
238
- XDGEventBus.Publish(XDGEvents.TapSDKRegisterComplianceCallback, ConfigModule.IsGlobal);
239
- }
240
- catch (Exception e)
241
- {
242
- XDGLogger.Error($"注册防沉迷回调失败: {e.Message}");
243
- }
242
+ XDGEventBus.Publish(XDGEvents.TapSDKRegisterComplianceCallback, ConfigModule.IsGlobal);
243
+ }
244
+
245
+ private static void InitSupportModule()
246
+ {
247
+ XDGEventBus.Publish(XDGEvents.AccountSupportStartPolling);
244
248
  }
245
249
 
246
250
  private static void InitWebViewUa()
@@ -248,7 +252,7 @@ namespace XD.SDK.Common.Internal.Standalone
248
252
  var region = ConfigModule.IsGlobal ? "global" : "cn";
249
253
  //TODO 设置 UserAgent 提前
250
254
  // Web.SetUserAgent(
251
- // $"{WebBridgeConstants.UserAgent} Unity/{Application.unityVersion} XDSDK/{XDGConstants.SDK_VERSION} ({XDGConstants.SDK_VERSION_CODE}; {region})");
255
+ // $"{WebBridgeConstants.UserAgent} Unity/{Application.unityVersion} XDSDK/{XDGConstants.SDK_VERSION} ({XDGConstants.SDK_VERSION_CODE}; {region})");
252
256
  //
253
257
  }
254
258
  }
@@ -0,0 +1,28 @@
1
+ #if UNITY_EDITOR || UNITY_STANDALONE
2
+ using Newtonsoft.Json;
3
+
4
+ namespace XD.SDK.Common.Internal.Standalone
5
+ {
6
+ public class AntiConfig
7
+ {
8
+ private const string AgeLimitTitleTest = "游戏健康提醒";
9
+
10
+ private const string AgeLimitContentText =
11
+ "您当前年龄<color=#FF8156>未达到游戏适龄标准</color>。根据中国《未成年人网络保护条例》及相关法律法规,未达到游戏适龄标准的未成年人无法访问或体验对应游戏。";
12
+
13
+ private const string AgeLimitConfirmText = "返回登录界面";
14
+
15
+ [JsonProperty("enabled")] public bool Enabled = true;
16
+
17
+ [JsonProperty("useAgeRange")] public bool UseAgeRange = false;
18
+
19
+ [JsonProperty("showSwitchAccount")] public bool ShowSwitchAccount = true;
20
+
21
+ [JsonProperty("ageLimitTitle")] public string AgeLimitTitle = AgeLimitTitleTest;
22
+
23
+ [JsonProperty("ageLimitContent")] public string AgeLimitContent = AgeLimitContentText;
24
+
25
+ [JsonProperty("ageLimitConfirm")] public string AgeLimitConfirm = AgeLimitConfirmText;
26
+ }
27
+ }
28
+ #endif
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: a9878f541ca44139aa6ef921031a8be7
3
+ timeCreated: 1755508081
@@ -12,7 +12,7 @@ namespace XD.SDK.Common.Internal.Standalone
12
12
 
13
13
  [JsonProperty("canUnbind")] public int CanUnbind { get; set; }
14
14
  }
15
-
15
+
16
16
  public class AppConfig
17
17
  {
18
18
  [JsonProperty("client_id")] public string ClientId { get; internal set; }
@@ -39,16 +39,20 @@ namespace XD.SDK.Common.Internal.Standalone
39
39
 
40
40
  [JsonProperty("facebook")] public FacebookConfig Facebook { get; internal set; }
41
41
 
42
- [JsonIgnore] public string Region { get; internal set; }
42
+ [JsonProperty("anit")] public AntiConfig Anti { get; internal set; }
43
+
44
+ [JsonProperty("customer_disable")] public bool CustomerDisable { get; internal set; }
43
45
 
46
+ [JsonIgnore] public string Region { get; internal set; }
47
+
44
48
  [JsonIgnore] public List<BindEntryConfig> BindEntryConfigs { get; internal set; }
45
-
49
+
46
50
  [JsonIgnore] public List<string> WebWhiteList { get; set; }
47
-
51
+
48
52
  [JsonIgnore] public string PackageType;
49
-
53
+
50
54
  [JsonIgnore] public bool DisableAutoLogin2Tap { get; set; }
51
-
55
+
52
56
 
53
57
  /// <summary>
54
58
  /// 判断是否为海外
@@ -22,6 +22,8 @@ namespace XD.SDK.Common.Internal.Standalone
22
22
  [JsonProperty("webWhiteList")] public List<string> WebWhiteList { get; private set; }
23
23
 
24
24
  [JsonProperty("disableAutoLogin2Tap")] public bool DisableAutoLogin2Tap { get; private set; }
25
+
26
+ [JsonProperty("anti")] public AntiConfig Anti { get; private set; }
25
27
  }
26
28
  }
27
29
  #endif
@@ -121,6 +121,11 @@ namespace XD.SDK.Common.Internal.Standalone
121
121
  }
122
122
  }
123
123
 
124
+ if (_appConfig.Anti == null)
125
+ {
126
+ _appConfig.Anti = new AntiConfig();
127
+ }
128
+
124
129
  _appConfig.WebWhiteList = WEB_WHITE_LIST;
125
130
  }
126
131
 
@@ -173,6 +178,27 @@ namespace XD.SDK.Common.Internal.Standalone
173
178
  _appConfig.WebWhiteList = config.WebWhiteList;
174
179
  }
175
180
 
181
+ if (config.Anti != null)
182
+ {
183
+ _appConfig.Anti.Enabled = config.Anti.Enabled;
184
+ _appConfig.Anti.ShowSwitchAccount = config.Anti.ShowSwitchAccount;
185
+ _appConfig.Anti.UseAgeRange = config.Anti.UseAgeRange;
186
+ if (!string.IsNullOrEmpty(config.Anti.AgeLimitConfirm))
187
+ {
188
+ _appConfig.Anti.AgeLimitConfirm = config.Anti.AgeLimitConfirm;
189
+ }
190
+
191
+ if (!string.IsNullOrEmpty(config.Anti.AgeLimitContent))
192
+ {
193
+ _appConfig.Anti.AgeLimitContent = config.Anti.AgeLimitContent;
194
+ }
195
+
196
+ if (!string.IsNullOrEmpty(config.Anti.AgeLimitTitle))
197
+ {
198
+ _appConfig.Anti.AgeLimitTitle = config.Anti.AgeLimitTitle;
199
+ }
200
+ }
201
+
176
202
  _appConfig.DisableAutoLogin2Tap = config.DisableAutoLogin2Tap;
177
203
  }
178
204
 
@@ -210,6 +236,8 @@ namespace XD.SDK.Common.Internal.Standalone
210
236
 
211
237
  public static FacebookConfig Facebook => _appConfig.Facebook;
212
238
 
239
+ public static AntiConfig Anti => _appConfig.Anti;
240
+
213
241
  public static List<string> WebWhiteList => _appConfig?.WebWhiteList;
214
242
 
215
243
  public static bool IsGlobal => _appConfig.IsGlobal;
@@ -219,6 +247,8 @@ namespace XD.SDK.Common.Internal.Standalone
219
247
  public static bool DisableAutoLogin2Tap => _appConfig.DisableAutoLogin2Tap;
220
248
 
221
249
  public static string CancelUrl => _appConfig.CancelUrl;
250
+
251
+ public static bool CustomerDisable => _appConfig.CustomerDisable;
222
252
  }
223
253
  }
224
254
  #endif
package/link.xml CHANGED
@@ -11,15 +11,6 @@
11
11
  <assembly fullname="XD.SDK.DouYinCPS" preserve="all" />
12
12
  <assembly fullname="XD.SDK.Mainland" preserve="all" />
13
13
  <assembly fullname="XD.SDK.Oversea" preserve="all" />
14
- <assembly fullname="TapTap.Common.Runtime" preserve="all" />
15
- <assembly fullname="TapTap.Common.Mobile.Runtime" preserve="all" />
16
- <assembly fullname="TapTap.Common.Standalone.Runtime" preserve="all" />
17
- <assembly fullname="TapTap.Login.Runtime" preserve="all" />
18
- <assembly fullname="TapTap.Login.Standalone.Runtime" preserve="all" />
19
- <assembly fullname="TapTap.TapDB.Runtime" preserve="all" />
20
- <assembly fullname="TapTap.TapDB.Standalone.Runtime" preserve="all" />
21
- <assembly fullname="TapTap.AntiAddiction.Runtime" preserve="all" />
22
- <assembly fullname="TapTap.AntiAddiction.Standalone.Runtime" preserve="all" />
23
- <assembly fullname="TapTap.Moment.Runtime" preserve="all" />
24
- <assembly fullname="TapTap.Moment.Standalone.Runtime" preserve="all" />
14
+ <assembly fullname="XD.SDK.Tap" preserve="all" />
15
+ <assembly fullname="XD.SDK.Tap.Plus" preserve="all" />
25
16
  </linker>
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "com.xd.sdk.common",
3
3
  "displayName": "XDGSDK Common",
4
- "version": "0.0.10-alpha",
4
+ "version": "0.0.13-alpha",
5
5
  "description": "XDGSDK",
6
6
  "unity": "2019.3",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "com.xd.sdk.foundation": "0.0.10-alpha"
9
+ "com.xd.sdk.foundation": "0.0.13-alpha"
10
10
  }
11
11
  }
@@ -1,107 +0,0 @@
1
- using System;
2
- using System.Collections.Generic;
3
- using XD.SDK.Common.Internal.Events;
4
-
5
-
6
- namespace XD.SDK.Common.Internal
7
- {
8
- public static class XDGTapSDK
9
- {
10
- #region TapMoment
11
-
12
- public static void SetMomentCallback(Action<int, string> callback)
13
- {
14
- XDGEventBus.Publish(XDGEvents.TapSDKRegisterMomentCallback, callback);
15
- }
16
-
17
- public static void MomentOpen()
18
- {
19
- XDGEventBus.Publish(XDGEvents.TapSDKMomentOpen);
20
- }
21
-
22
- public static void MomentOpenScene(string sceneId)
23
- {
24
- XDGEventBus.Publish(XDGEvents.TapSDKMomentOpenScene, sceneId);
25
- }
26
-
27
- public static void MomentFetchNotification()
28
- {
29
- XDGEventBus.Publish(XDGEvents.TapSDKMomentFetchNotification);
30
- }
31
-
32
- public static void MomentClose(string title, string content)
33
- {
34
- XDGEventBus.Publish(XDGEvents.TapSDKMomentCloseWithTitle, title, content);
35
- }
36
-
37
- public static void MomentClose()
38
- {
39
- XDGEventBus.Publish(XDGEvents.TapSDKMomentClose);
40
- }
41
-
42
- public static void MomentPublish(string content, List<string> images)
43
- {
44
- XDGEventBus.Publish(XDGEvents.TapSDKMomentPublish, content, images);
45
- }
46
-
47
- #endregion
48
-
49
-
50
- #region TapTapLicense
51
-
52
- public static void RegisterLicenseCallback(Action callback)
53
- {
54
- XDGEventBus.Publish(XDGEvents.TapSDKRegisterLicenseCallBack, callback);
55
- }
56
-
57
- public static void RegisterDLCCallback(Action<int, Dictionary<string, object>> onQueryCallback, Action<string, int> onOrderCallback)
58
- {
59
- XDGEventBus.Publish(XDGEvents.TapSDKRegisterDLCCallback, onQueryCallback, onOrderCallback);
60
- }
61
-
62
- public static void CheckLicense(bool force = false)
63
- {
64
- XDGEventBus.Publish(XDGEvents.TapSDKCheckLicense, force);
65
- }
66
-
67
- public static void QueryDLC(string[] dlcList)
68
- {
69
- XDGEventBus.Publish(XDGEvents.TapSDKQueryDLC, dlcList);
70
- }
71
-
72
- public static void PurchaseDLC(string dlc)
73
- {
74
- XDGEventBus.Publish(XDGEvents.TapSDKPurchaseDLC, dlc);
75
- }
76
-
77
- public static void SetTestEnvironment(bool isTest)
78
- {
79
- XDGEventBus.Publish(XDGEvents.TapSDKSetTestEnvironment, isTest);
80
- }
81
-
82
- #endregion
83
-
84
- #region TapReview
85
-
86
- public static void OpenReview()
87
- {
88
- XDGEventBus.Publish(XDGEvents.TapSDKReviewOpen);
89
- }
90
-
91
- #endregion
92
-
93
- #region TapUpdate
94
-
95
- public static void UpdateGame(Action action)
96
- {
97
- XDGEventBus.Publish(XDGEvents.TapSDKUpdateGame, action);
98
- }
99
-
100
- public static void CheckForceUpdate()
101
- {
102
- XDGEventBus.Publish(XDGEvents.TapSDKCheckForceUpdate);
103
- }
104
-
105
- #endregion
106
- }
107
- }
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 19a09f46128c4e26980495d6ed29a28a
3
- timeCreated: 1752119429