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.
- package/Editor/iOS/XDGIOSCommonProcessor.cs +19 -1
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDVersion.h +3 -3
- package/Plugins/iOS/XDCommonSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDCommonSDK.framework/XDCommonSDK +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Headers/XDTapSDK4WrapperSDK.h +3 -3
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Info.plist +0 -0
- package/Runtime/Internal/Mobile/Bridge/BridgeConstants.cs +4 -0
- package/Runtime/Internal/Mobile/CommonFeaturesImpl.cs +1 -2
- package/package.json +2 -2
|
@@ -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
|
-
{",
|
|
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;",
|
|
Binary file
|
|
Binary file
|
|
@@ -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.
|
|
19
|
-
#define XDGTapSDK4_VERSION_CODE @"
|
|
20
|
-
// HASH
|
|
18
|
+
#define XDGTapSDK4_VERSION @"7.3.1"
|
|
19
|
+
#define XDGTapSDK4_VERSION_CODE @"7030100"
|
|
20
|
+
// HASH e51483ce
|
|
21
21
|
|
|
22
22
|
// 对外导出的协议和封装类
|
|
23
23
|
// Achievement
|
|
Binary file
|
|
@@ -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
|
|
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.
|
|
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.
|
|
9
|
+
"com.xd.sdk.foundation": "7.3.2"
|
|
10
10
|
}
|
|
11
11
|
}
|