Q:Universal Link校验不通过,无法调起微信支付?
A:请开发者在调用register接口前,打开WXApi.h的日志接口,观察报错日志和原因:
+ (voidstartLogByLevel:(WXLogLevel)levellogBlock:(WXLogBolock)logBlock
Q:接入新SDK,跳到微信后再回跳App,流程就中止?
A:1. 首先,微信唤起App,App一定会收到系统回调。请确认系统回调是Scheme回调还是Universal Links回调。
2. 如果是Scheme回调,请检查是否走了UISceneDelegate(XCode11构建的项目),或是UIApplicationDelegate。它们的回调方法分别是
- (void)scene:(UIScene *)scene openURLContexts:(NSSetUIOpenURLContext *> *)URLContexts;
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionaryUIApplicationOpenURLOptionsKey, id> *)options;
3. 如果是Universal Links回调,同样也检查是否走了UISceneDelegate(XCode11构建的项目),或是UIApplicationDelegate。它们的回调方法分别是
- (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArrayidUIUserActivityRest
oring>> * __nullable restorableObjects))restorationHandler
4. 因为考虑兼容旧版本微信,因此无论Scheme或Universal Links回调都必须处理。 在重写回调方法后,需要分别调用WXApi的handleOpenUrl和handleOpenUniversalLink方法
示例:
- (voidscene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity {
return [WXApi handleOpenUniversalLink:userActivity delegate:self
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:void(^)(NSArrayidUIUserActivityRest
oring>> * __nullable restorableObjects))restorationHandler {
return [WXApi handleOpenUniversalLink:userActivity delegate:self];
https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html
SDK不成熟就不要放出来让大家用,这么多问题,半年了还不解决,这么多bugs,写SDK的KPI都是纸糊的吗?
universal link依赖iOS系统去官网下载配置的associate文件。这个时间是不可控的,最多会有两三天的延迟,这个跟app的使用频率有关。
微信新的sdk依赖这个去做校验是不负责任的做法,因为刚安装app的设备,系统还来不及拉取这个文件,这个时候就会出现正在连接,始终不能正常跳转支付或者分享的情况。这也是为什么部分设备会出现问题而有的设备正常的原因。验证很简单,有问题的设备,每天尝试打开下app(尽量触发系统去拉取associate文件),不用更新app。。最多两天,等系统拉取到了配置文件,自然就正常了。
我不知道微信的团队是否发现了这个问题,核心原因就是这个universal link不是立即生效的。
只检查到了第四部就停止了
无法调起微信发起分享
iOS13系统以上只显示这个界面 又回到app了
wxlog:Error:fail to load Keychain status:-25300, keyData null:1
wxlog:token[(null)] is null
iOS 13.3 其他手机可以何解
请问如何解决呢?
一直不通过,总是通用连接问题,能给到具体的演示吗?这样调试真的狠累
2020-07-10 15:41:49.602735+0800 RedWineNavigation[2245:341005] WeixinSDK2:0, 1, check passed,
2020-07-10 15:41:49.603769+0800 RedWineNavigation[2245:341005] WeixinSDK2:1, 1, check passed,
2020-07-10 15:41:49.606987+0800 RedWineNavigation[2245:341005] WeixinSDK2:2, 1, check passed,
2020-07-10 15:41:49.703488+0800 RedWineNavigation[2245:341005] WeixinSDK2:3, 1, check passed,
2020-07-10 15:41:50.751135+0800 RedWineNavigation[2245:341005] WeixinSDK2:4, 1, check passed,
2020-07-10 15:41:52.824225+0800 RedWineNavigation[2245:341005] WeixinSDK2:5, 0, Universal Link check failed. The application is launched by WeChat via scheme, Common problems self-check guide: [微信开放平台App iOS端接入新版本SDK 常见问题自查指引]https://developers.weixin.qq.com/community/develop/doc/000ce0403bc9d0ea1a0a67f415b409
wx-open-launch-app标签拉起app,走的handleOpenURL未走handleOpenUniversalLink
wxsdk的文档,有两个api是用来吊起app 分别是handleOpenURL和handleOpenUniversalLink
我目前微信是最新版本
但是wx-open-launch-app拉起app,调试下来发现拉起我们app是走的handleOpenURL的回调拉起的,按照文档不应该走handleOpenUniversalLink拉起app么
而且我universallink的check是通过的
Universal Link check failed. The application is launched by WeChat via scheme
但是我只是13.3.1的手机这样,其他手机的通用链接都校验通过了,这是什么原因。现在是这个手机能分享,但是点弹窗中返回某某APP,回不到APP
--TIME:19:08:15.936000+0800【FILE:AppDelegate.m--LINE:36】FUNCTION:-[AppDelegate application:didFinishLaunchingWithOptions:]_block_invoke
weichatSDK: wxlog:set property list
2020-08-18 19:08:15.956729+0800 XSLiveSocial[11889:2822517] PBItemCollectionServicer connection disconnected.
--TIME:19:08:15.957000+0800【FILE:AppDelegate.m--LINE:36】FUNCTION:-[AppDelegate application:didFinishLaunchingWithOptions:]_block_invoke
weichatSDK: wxlog:Error:fail to load Keychain status:-25300, keyData null:1
--TIME:19:08:15.958000+0800【FILE:AppDelegate.m--LINE:36】FUNCTION:-[AppDelegate application:didFinishLaunchingWithOptions:]_block_invoke
weichatSDK: wxlog:token[(null)] is null
--TIME:19:08:15.988000+0800【FILE:AppDelegate.m--LINE:36】FUNCTION:-[AppDelegate application:didFinishLaunchingWithOptions:]_block_invoke
weichatSDK: wxlog:launch app with ul only success
--TIME:19:08:15.989000+0800【FILE:AppDelegate.m--LINE:36】FUNCTION:-[AppDelegate application:didFinishLaunchingWithOptions:]_block_invoke
weichatSDK: wxlog:launch app with universal link, ret:1
--TIME:19:08:15.989000+0800【FILE:AppDelegate.m--LINE:36】FUNCTION:-[AppDelegate application:didFinishLaunchingWithOptions:]_block_invoke
weichatSDK: wxlog:req:
2020-08-18 19:08:16.263737+0800 XSLiveSocial[11889:2822517] PBItemCollectionServicer connection disconnected.
2020-08-18 19:08:16.799100+0800 XSLiveSocial[11889:2821702] [Snapshotting] Snapshotting a view (0x10691da00, UIKeyboardImpl) that has not been rendered at least once requires afterScreenUpdates:YES.
老项目没有scene,报-25300的错,ulink文件也测试过了,appdelegate里回调都不走,请问怎么解决
这新版本sdk 没法用