@gyjshow/react-native-wechat 1.0.6 → 1.0.7
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/ios/RNWeChat/RNWeChat.m +13 -0
- package/package.json +1 -1
package/ios/RNWeChat/RNWeChat.m
CHANGED
|
@@ -9,6 +9,12 @@ RCT_EXPORT_METHOD(registerApp:(NSString *)appId
|
|
|
9
9
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
10
10
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
11
11
|
{
|
|
12
|
+
|
|
13
|
+
//在register之前打开log, 后续可以根据log排查问题
|
|
14
|
+
[WXApi startLogByLevel:WXLogLevelDetail logBlock:^(NSString *log) {
|
|
15
|
+
NSLog(@"WeChatSDK: %@", log);
|
|
16
|
+
}];
|
|
17
|
+
|
|
12
18
|
NSString *universalLink =
|
|
13
19
|
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"WeChatUniversalLink"];
|
|
14
20
|
|
|
@@ -20,6 +26,13 @@ RCT_EXPORT_METHOD(registerApp:(NSString *)appId
|
|
|
20
26
|
}
|
|
21
27
|
|
|
22
28
|
BOOL success = [WXApi registerApp:appId universalLink:universalLink];
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
//调用自检函数
|
|
32
|
+
[WXApi checkUniversalLinkReady:^(WXULCheckStep step, WXCheckULStepResult* result) {
|
|
33
|
+
NSLog(@"%@, %u, %@, %@", @(step), result.success, result.errorInfo, result.suggestion);
|
|
34
|
+
}];
|
|
35
|
+
|
|
23
36
|
resolve(@(success));
|
|
24
37
|
}
|
|
25
38
|
|