IOS SDK 1.8.6.2,微信版本7.0.11
Xcode11.3.1,但是我打开的是从unity中导出的工程,工程里是没有UISceneDelegate的。
网页打开universal links可以下拉正常出现用app打开。在app中点击登陆跳转到微信,也没有提示universal links验证失败。但从微信返回应用的时候,并没有走onResp,重写的continueUserActivity函数也没有打印,登陆流程中断。但是改掉applinks里配置的链接,走scheme流程则可以登陆成功。
我看了类似的几个提问,他们好像都是universal links验证失败,但我的这里应该是成功的,不知道是什么问题。
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> *restorableObjects))restorationHandler
{
//NSString * urlStr = [url absoluteString];
::printf("-> continueUserActivity()\n");
return [WXApi handleOpenUniversalLink:userActivity delegate:WXApiManager.sharedManager];
}
日志:
微信登陆2020-02-29 18:56:35.667682+0800 coechina[965:288558] 微信错误日志 wxlog:send req[<SendAuthReq: 0x2802ab180>], appID:wx1a5abff778ef428e, universalLink:https://www.leme.hk.cn/, sdkVersion:1.8.6.2
2020-02-29 18:56:35.792878+0800 coechina[965:288558] 微信错误日志 wxlog:set property list
2020-02-29 18:56:35.870336+0800 coechina[965:288558] 微信错误日志 wxlog:launch app with ul only success
2020-02-29 18:56:35.870489+0800 coechina[965:288558] 微信错误日志 wxlog:launch app with universal link, ret:1
2020-02-29 18:56:35.870555+0800 coechina[965:288558] 微信错误日志 wxlog:req:<SendAuthReq: 0x2802ab180>, cid:cd6ee9bbce4dc5151372a5a7238980e7d39518db
-> applicationWillResignActive()
2020-02-29 18:56:36.462218+0800 coechina[965:289588] PBItemCollectionServicer connection disconnected.
-> applicationDidEnterBackground()
2020-02-29 18:56:36.983684+0800 coechina[965:288558] Can't end BackgroundTask: no background task exists with identifier 2 (0x2), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
-> applicationWillEnterForeground()
-> applicationDidBecomeActive()
项目里有AppDelegate吗?
重写AppDelegate的continueUserActivity方法了吗?