com.xd.sdk.common 7.0.0 → 7.0.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 +6 -4
- package/Plugins/Android/libs/XDGCommon_7.0.1.aar +0 -0
- package/Plugins/Android/libs/{XDGCommon_7.0.0.aar.meta → XDGCommon_7.0.1.aar.meta} +1 -1
- package/Plugins/Android/libs/XDTapTapWrapper_7.0.1.aar.meta +32 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalRouterSchemes.h +1 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDConfigManager.h +1 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGConfig.h +3 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGKuaiShouShareParam.h +35 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGKuaiShouShareParam.h.meta +7 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGLogger.h +2 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGShareParamBase.h +2 -1
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGSharing.h +3 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDKuaiShouInfo.h +19 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDKuaiShouInfo.h.meta +7 -0
- 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-Swift.h +3 -1
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Headers/XDTapSDK4WrapperSDK.h +3 -3
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/de.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/de.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/en.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/en.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/es.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/es.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/fr.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/fr.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/in.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/in.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/ja.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/ja.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/ko.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/ko.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/ms.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/ms.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/pt.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/pt.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/ru.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/ru.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/th.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/th.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/tr.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/tr.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/vi.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/vi.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/zh-Hans.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/zh-Hans.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/zh-Hant.lproj/Localizable.strings.meta +7 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle/zh-Hant.lproj.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/TapSupportResource.bundle.meta +8 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/XDTapSDK4WrapperSDK +0 -0
- package/Resources/Prefabs/XDWebBridgeView.prefab +1 -1
- package/Runtime/Internal/Standalone/CommonFeaturesImpl.cs +4 -4
- package/Runtime/Internal/Standalone/Web/Function/BackgroundColorWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/CloseVisibleWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/CloseWebFunction.cs +2 -5
- package/Runtime/Internal/Standalone/Web/Function/GameMessageWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/Function/NavigationWebFunction.cs +1 -1
- package/Runtime/Internal/Standalone/Web/WebBridgeController.cs +34 -27
- package/Runtime/Internal/Standalone/Web/XDWebBridgeView.cs +10 -3
- package/package.json +2 -2
- package/Plugins/Android/libs/XDGCommon_7.0.0.aar +0 -0
- package/Plugins/Android/libs/XDTapTapWrapper_7.0.0.aar.meta +0 -3
- /package/Plugins/Android/libs/{XDGBridgeCommon_v7_7.0.0.aar → XDGBridgeCommon_v7_7.0.1.aar} +0 -0
- /package/Plugins/Android/libs/{XDGBridgeCommon_v7_7.0.0.aar.meta → XDGBridgeCommon_v7_7.0.1.aar.meta} +0 -0
- /package/Plugins/Android/libs/{XDGTapTapWrapperInternal_7.0.0.aar → XDGTapTapWrapperInternal_7.0.1.aar} +0 -0
- /package/Plugins/Android/libs/{XDGTapTapWrapperInternal_7.0.0.aar.meta → XDGTapTapWrapperInternal_7.0.1.aar.meta} +0 -0
- /package/Plugins/Android/libs/{XDTapTapWrapper_7.0.0.aar → XDTapTapWrapper_7.0.1.aar} +0 -0
|
@@ -453,11 +453,13 @@ namespace XD.SDK.Common.Editor
|
|
|
453
453
|
plistArray.AddString(items[i]);
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
if (!item.Key.Equals("taptap"))
|
|
456
|
+
if (customPlistDic != null) {
|
|
457
|
+
foreach (var item in customPlistDic)
|
|
459
458
|
{
|
|
460
|
-
|
|
459
|
+
if (!item.Key.Equals("taptap"))
|
|
460
|
+
{
|
|
461
|
+
_rootDic.SetString(item.Key, item.Value.ToString());
|
|
462
|
+
}
|
|
461
463
|
}
|
|
462
464
|
}
|
|
463
465
|
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 082d115a60bee4bccb8d6de4cdafc8ee
|
|
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:
|
|
@@ -32,6 +32,7 @@ FOUNDATION_EXPORT TDSGlobalRouterScheme TDSGLOBAL_SHARE_WEIBO;
|
|
|
32
32
|
FOUNDATION_EXPORT TDSGlobalRouterScheme TDSGLOBAL_SHARE_DOUYIN;
|
|
33
33
|
FOUNDATION_EXPORT TDSGlobalRouterScheme TDSGLOBAL_SHARE_XHS;
|
|
34
34
|
FOUNDATION_EXPORT TDSGlobalRouterScheme TDSGLOBAL_SHARE_TapTap;
|
|
35
|
+
FOUNDATION_EXPORT TDSGlobalRouterScheme TDSGLOBAL_SHARE_KuaiShou;
|
|
35
36
|
|
|
36
37
|
FOUNDATION_EXPORT TDSGlobalRouterScheme TDSGLOBAL_SHARE_FACEBOOK;
|
|
37
38
|
FOUNDATION_EXPORT TDSGlobalRouterScheme TDSGLOBAL_SHARE_LINE;
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
#import <XDCommonSDK/XDDouYinInfo.h>
|
|
25
25
|
#import <XDCommonSDK/XDXHSInfo.h>
|
|
26
26
|
#import <XDCommonSDK/XDAliYunInfo.h>
|
|
27
|
+
#import <XDCommonSDK/XDKuaiShouInfo.h>
|
|
27
28
|
|
|
28
29
|
NS_ASSUME_NONNULL_BEGIN
|
|
29
30
|
|
|
@@ -80,6 +81,8 @@ typedef NS_ENUM(NSInteger, XDSDKRegionType) {
|
|
|
80
81
|
@property (nonatomic, strong) XDXHSInfo *xhsInfo;
|
|
81
82
|
/// 阿里云 配置信息
|
|
82
83
|
@property (nonatomic, strong) XDAliYunInfo *aliyunInfo;
|
|
84
|
+
/// 快手 配置信息
|
|
85
|
+
@property (nonatomic, strong) XDKuaiShouInfo *kuaiShouInfo;
|
|
83
86
|
|
|
84
87
|
/// 统一登录窗口中的品牌向 logo 素材 URL 数组,需要3个,不配置的话默认https://res.xdcdn.net/TDS/Global/res/xd_logo.png
|
|
85
88
|
@property (nonatomic, copy) NSArray *logos;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//
|
|
2
|
+
// XDGKuaiShouShareParam.h
|
|
3
|
+
// XDCommonSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Fattycat on 2025/8/28.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <XDCommonSDK/XDGShareParamBase.h>
|
|
10
|
+
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
@interface XDGKuaiShouShareParam : XDGShareParamBase
|
|
14
|
+
|
|
15
|
+
/// 分享的图片的本地沙盒路径
|
|
16
|
+
@property (nonatomic, strong, nullable) NSString *imageUrl;
|
|
17
|
+
|
|
18
|
+
/// 分享的图片 Data
|
|
19
|
+
@property (nonatomic, strong, nullable) NSData *imageData;
|
|
20
|
+
|
|
21
|
+
/// 分享的视频的 localIdentifier
|
|
22
|
+
@property (nonatomic, strong, nullable) NSString *videoId;
|
|
23
|
+
|
|
24
|
+
/// 分享的视频 url
|
|
25
|
+
@property (nonatomic, strong, nullable) NSString *videoUrl;
|
|
26
|
+
|
|
27
|
+
/// 分享的标签
|
|
28
|
+
@property (nonatomic, strong, nullable) NSArray<NSString *> *tags;
|
|
29
|
+
|
|
30
|
+
/// 检查参数是否可用
|
|
31
|
+
- (NSError *_Nullable)checkValid;
|
|
32
|
+
|
|
33
|
+
@end
|
|
34
|
+
|
|
35
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -21,7 +21,8 @@ typedef NS_ENUM(NSInteger, XDGSharePlatformType) {
|
|
|
21
21
|
XDGSharePlatformTypeLine = 7,
|
|
22
22
|
XDGSharePlatformTypeTapTap = 8,
|
|
23
23
|
XDGSharePlatformTypeTikTok = 9,
|
|
24
|
-
XDGSharePlatformTypeInstagram = 10
|
|
24
|
+
XDGSharePlatformTypeInstagram = 10,
|
|
25
|
+
XDGSharePlatformTypeKuaiShou = 11
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
typedef NS_ENUM(NSInteger, XDGShareSceneType) {
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
#import <XDCommonSDK/XDGTwitterShareParam.h>
|
|
17
17
|
#import <XDCommonSDK/XDGLineShareParam.h>
|
|
18
18
|
#import <XDCommonSDK/XDGTapTapShareParam.h>
|
|
19
|
+
#import <XDCommonSDK/XDGTikTokShareParam.h>
|
|
20
|
+
#import <XDCommonSDK/XDGInstagramShareParam.h>
|
|
21
|
+
#import <XDCommonSDK/XDGKuaiShouShareParam.h>
|
|
19
22
|
|
|
20
23
|
NS_ASSUME_NONNULL_BEGIN
|
|
21
24
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// XDKuaiShouInfo.h
|
|
3
|
+
// XDCommonSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Fattycat on 2025/8/28.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
@interface XDKuaiShouInfo : NSObject
|
|
13
|
+
@property (nonatomic, copy) NSString *appId;
|
|
14
|
+
@property (nonatomic, copy) NSString *universalLink;
|
|
15
|
+
|
|
16
|
+
+ (instancetype)instanceWithInfoDic:(NSDictionary *)infoDic;
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_END
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#if 0
|
|
2
2
|
#elif defined(__arm64__) && __arm64__
|
|
3
|
-
// Generated by Apple Swift version 6.
|
|
3
|
+
// Generated by Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
|
|
4
4
|
#ifndef XDTAPSDK4WRAPPERSDK_SWIFT_H
|
|
5
5
|
#define XDTAPSDK4WRAPPERSDK_SWIFT_H
|
|
6
6
|
#pragma clang diagnostic push
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
# if __has_include(<uchar.h>)
|
|
66
66
|
# include <uchar.h>
|
|
67
67
|
# elif !defined(__cplusplus)
|
|
68
|
+
typedef unsigned char char8_t;
|
|
68
69
|
typedef uint_least16_t char16_t;
|
|
69
70
|
typedef uint_least32_t char32_t;
|
|
70
71
|
# endif
|
|
@@ -301,6 +302,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
301
302
|
#endif
|
|
302
303
|
|
|
303
304
|
#if defined(__OBJC__)
|
|
305
|
+
|
|
304
306
|
#endif
|
|
305
307
|
#if __has_attribute(external_source_symbol)
|
|
306
308
|
# pragma clang attribute pop
|
|
@@ -15,6 +15,6 @@ 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.0.
|
|
19
|
-
#define XDGTapSDK4_VERSION_CODE @"
|
|
20
|
-
// HASH
|
|
18
|
+
#define XDGTapSDK4_VERSION @"7.0.2"
|
|
19
|
+
#define XDGTapSDK4_VERSION_CODE @"7000020"
|
|
20
|
+
// HASH ed74f1fb
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -184,7 +184,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
184
184
|
|
|
185
185
|
IPInfoModule.RequestIpInfoAndSave();
|
|
186
186
|
|
|
187
|
-
InitTap(param);
|
|
187
|
+
await InitTap(param);
|
|
188
188
|
|
|
189
189
|
//TODO 注册防沉迷回调
|
|
190
190
|
RegisterTapComplianceCallback();
|
|
@@ -206,12 +206,13 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
private static async
|
|
209
|
+
private static async Task InitTap(XDGInitParam initParam)
|
|
210
210
|
{
|
|
211
211
|
var tapConfig = ConfigModule.TapConfig;
|
|
212
212
|
|
|
213
213
|
await XDGEventBus.PublishAsync(XDGEvents.TapSDKInit,
|
|
214
|
-
initParam.Lang.FormatToXDLangString()
|
|
214
|
+
initParam.Lang.FormatToXDLangString(),
|
|
215
|
+
initParam.PackageType);
|
|
215
216
|
|
|
216
217
|
XDGEventBus.Publish(XDGEvents.TdsSDKInit, tapConfig.ClientId,
|
|
217
218
|
tapConfig.ClientToken,
|
|
@@ -237,7 +238,6 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
237
238
|
}
|
|
238
239
|
catch (Exception e)
|
|
239
240
|
{
|
|
240
|
-
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -17,7 +17,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
17
17
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
18
18
|
{
|
|
19
19
|
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
20
|
-
webView.ProviderWebTrans()
|
|
20
|
+
webView.ProviderWebTrans()?.Transparent(GetName(), data);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -16,7 +16,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
16
16
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
17
17
|
{
|
|
18
18
|
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
19
|
-
webView.ProviderWebTrans()
|
|
19
|
+
webView.ProviderWebTrans()?.Transparent(Tag, data);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -16,12 +16,9 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
16
16
|
{
|
|
17
17
|
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
18
18
|
var dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(data);
|
|
19
|
-
|
|
20
|
-
callbackFunction?.Invoke(new WebBridgeResponse.Success
|
|
21
|
-
{
|
|
22
|
-
Data = extra
|
|
23
|
-
});
|
|
19
|
+
webView.ProviderWebTrans()?.TransObserver(WebActionEnum.CLOSE, dic);
|
|
24
20
|
UIManager.Dismiss();
|
|
21
|
+
webView.Release();
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
24
|
}
|
|
@@ -16,7 +16,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
16
16
|
{
|
|
17
17
|
XDGLogger.Debug("GameMessageWebFunction.Handler()");
|
|
18
18
|
var dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(data);
|
|
19
|
-
webView.ProviderWebTrans()
|
|
19
|
+
webView.ProviderWebTrans()?.TransObserver(WebActionEnum.MESSAGE, dic);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -16,7 +16,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
16
16
|
public void Handler(IBridgeWebView webView, string data, Action<object> callbackFunction)
|
|
17
17
|
{
|
|
18
18
|
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}");
|
|
19
|
-
webView.ProviderWebTrans()
|
|
19
|
+
webView.ProviderWebTrans()?.Transparent(GetName(), data);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -34,39 +34,46 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
34
34
|
|
|
35
35
|
private void OnMessageEmitted()
|
|
36
36
|
{
|
|
37
|
-
|
|
37
|
+
try
|
|
38
38
|
{
|
|
39
|
-
|
|
39
|
+
webView.MessageEmitted += (_, args) =>
|
|
40
40
|
{
|
|
41
|
-
|
|
42
|
-
{
|
|
43
|
-
XDGLogger.Debug($"WebBridgeController OnMessageEmitted 白名单校验失败");
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
var content = DecodeBase64String(args.Value);
|
|
48
|
-
var dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(content);
|
|
49
|
-
if (dic == null)
|
|
41
|
+
try
|
|
50
42
|
{
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
if (!IsWhiteList())
|
|
44
|
+
{
|
|
45
|
+
XDGLogger.Debug($"WebBridgeController OnMessageEmitted 白名单校验失败");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var content = DecodeBase64String(args.Value);
|
|
50
|
+
var dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(content);
|
|
51
|
+
if (dic == null)
|
|
52
|
+
{
|
|
53
|
+
XDGLogger.Debug($"WebBridgeController OnMessageEmitted 解析 jsBridge 参数失败");
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (dic.TryGetValue("responseId", out var responseId))
|
|
58
|
+
{
|
|
59
|
+
DispatchResponse(responseId as string, dic["responseData"]);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
dic.TryGetValue("handlerName", out var handlerName);
|
|
64
|
+
dic.TryGetValue("callbackId", out var callbackId);
|
|
65
|
+
DispatchHandler(handlerName as string, callbackId as string, dic["data"]);
|
|
53
66
|
}
|
|
54
|
-
|
|
55
|
-
if (dic.TryGetValue("responseId", out var responseId))
|
|
67
|
+
catch (Exception e)
|
|
56
68
|
{
|
|
57
|
-
|
|
58
|
-
return;
|
|
69
|
+
XDGLogger.Debug(e.Message);
|
|
59
70
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{
|
|
67
|
-
XDGLogger.Debug(e.Message);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
catch (Exception e)
|
|
74
|
+
{
|
|
75
|
+
XDGLogger.Debug(e.Message);
|
|
76
|
+
}
|
|
70
77
|
}
|
|
71
78
|
|
|
72
79
|
public void RegisterHandler(IWebFunction handler)
|
|
@@ -88,8 +88,15 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
88
88
|
|
|
89
89
|
private void OnDestroy()
|
|
90
90
|
{
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
try
|
|
92
|
+
{
|
|
93
|
+
webBridgeController?.Release();
|
|
94
|
+
canvasWebViewPrefab?.Destroy();
|
|
95
|
+
}
|
|
96
|
+
catch (Exception e)
|
|
97
|
+
{
|
|
98
|
+
XDGLogger.Warn(e.Message);
|
|
99
|
+
}
|
|
93
100
|
}
|
|
94
101
|
|
|
95
102
|
private async void OnBackButtonClicked()
|
|
@@ -167,7 +174,7 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
167
174
|
|
|
168
175
|
if (loading)
|
|
169
176
|
{
|
|
170
|
-
UIManager.ShowLoading();
|
|
177
|
+
UIManager.ShowLoading(false, 5);
|
|
171
178
|
}
|
|
172
179
|
}
|
|
173
180
|
|
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.0.
|
|
4
|
+
"version": "7.0.2",
|
|
5
5
|
"description": "XDGSDK",
|
|
6
6
|
"unity": "2019.3",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"com.xd.sdk.foundation": "7.0.
|
|
9
|
+
"com.xd.sdk.foundation": "7.0.2"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|