com.xd.sdk.common 7.3.0 → 7.3.2

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.
@@ -668,8 +668,26 @@ namespace XD.SDK.Common.Editor
668
668
  UnityAppController.WriteBelow(@"AppController_SendNotificationWithArg(kUnityOnOpenURL, notifData);",
669
669
  @" [XDGSDK application:app openURL:url options:options];");
670
670
  UnityAppController.WriteBelow(@"AppController_SendNotificationWithArg(kUnityDidRegisterForRemoteNotificationsWithDeviceToken, deviceToken);", @" [XDGSDK application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];");
671
+ // 为 iOS 远程通知的 completion handler 添加一次性包装,避免多次调用
671
672
  UnityAppController.WriteBelow(@"didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))handler
672
- {"," [XDGSDK application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:handler];");
673
+ {",
674
+ @" __block BOOL hasCalledHandler = NO;
675
+ void (^safeHandler)(UIBackgroundFetchResult) = ^(UIBackgroundFetchResult result) {
676
+ if (!hasCalledHandler) {
677
+ hasCalledHandler = YES;
678
+ if (handler) {
679
+ handler(result);
680
+ }
681
+ }
682
+ };
683
+ [XDGSDK application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:safeHandler];");
684
+
685
+ // 将后续直接调用 handler(...) 的代码替换为调用 safeHandler(...),确保只触发一次
686
+ UnityAppController.Replace(@" if (handler)
687
+ {
688
+ handler(UIBackgroundFetchResultNoData);
689
+ }",
690
+ @" safeHandler(UIBackgroundFetchResultNoData);");
673
691
  if (CheckoutUniversalLinkHolder(unityAppControllerPath, @"NSURL* url = userActivity.webpageURL;"))
674
692
  {
675
693
  UnityAppController.WriteBelow(@"NSURL* url = userActivity.webpageURL;",
@@ -5,6 +5,6 @@
5
5
  // Created by Fattycat on 2022/5/13.
6
6
  //
7
7
 
8
- #define XDSDK_VERSION @"7.3.0"
9
- #define XDSDK_VERSION_CODE @"7030000"
10
- // HASH 387b4fda
8
+ #define XDSDK_VERSION @"7.3.1"
9
+ #define XDSDK_VERSION_CODE @"7030100"
10
+ // HASH e51483ce
@@ -15,9 +15,9 @@ 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
17
 
18
- #define XDGTapSDK4_VERSION @"7.3.0"
19
- #define XDGTapSDK4_VERSION_CODE @"7030000"
20
- // HASH 387b4fda
18
+ #define XDGTapSDK4_VERSION @"7.3.1"
19
+ #define XDGTapSDK4_VERSION_CODE @"7030100"
20
+ // HASH e51483ce
21
21
 
22
22
  // 对外导出的协议和封装类
23
23
  // Achievement
@@ -37,6 +37,8 @@ namespace XD.SDK.Common.Internal.Mobile.Bridge
37
37
  public const string BridgeName = "XDGBridgeSharing";
38
38
  public const string ServiceName = "com.xd.sdk.sharing.bridge.BridgeSharing";
39
39
  public const string ServiceImpl = "com.xd.sdk.sharing.bridge.BridgeSharingImpl";
40
+
41
+ public const string BridgeStaticImpl = "com.xd.sdk.sharing.bridge.SharingImpl";
40
42
  }
41
43
 
42
44
  public static class Push
@@ -44,6 +46,8 @@ namespace XD.SDK.Common.Internal.Mobile.Bridge
44
46
  public const string BridgeName = "XDGBridgePush";
45
47
  public const string ServiceName = "com.xd.sdk.push.bridge.BridgePush";
46
48
  public const string ServiceImpl = "com.xd.sdk.push.bridge.BridgePushImpl";
49
+
50
+ public const string BridgeStaticImpl = "com.xd.sdk.push.bridge.PushImpl";
47
51
  }
48
52
 
49
53
  public static class Announcement
@@ -223,8 +223,7 @@ namespace XD.SDK.Common.Internal.Mobile
223
223
  var dicStrStr = XDGJson.Deserialize(content);
224
224
  var dic = dicStrStr as Dictionary<string, object>;
225
225
  var actionType = XDDictionary.GetValue<int>(dic, "actionType");
226
- var dataStr = XDDictionary.GetValue<string>(dic, "actionData");
227
- var dataDic = XDGJson.Deserialize(dataStr) as Dictionary<string, object>;
226
+ var dataDic = XDDictionary.GetValue<Dictionary<string, object>>(dic, "actionData");
228
227
  callback?.Invoke((WebActionEnum)actionType, dataDic);
229
228
  });
230
229
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "com.xd.sdk.common",
3
3
  "displayName": "XDGSDK Common",
4
- "version": "7.3.0",
4
+ "version": "7.3.2",
5
5
  "description": "XDGSDK",
6
6
  "unity": "2019.3",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "com.xd.sdk.foundation": "7.3.0"
9
+ "com.xd.sdk.foundation": "7.3.2"
10
10
  }
11
11
  }