通过微信sdk的log 错误信息如下
2021-11-02 14:00:17.611231+0800 UniPluginDemo[13213:697947] WeChatSDK: wxlog:send req[<WXLaunchMiniProgramReq: 0x283e584c0>], appID:wx2c338a9ec0cd1e1a, universalLink:https://wodehaoguanjia.com/, sdkVersion:1.9.1
2021-11-02 14:00:17.611644+0800 UniPluginDemo[13213:697947] WeChatSDK: wxlog:LaunchMiniProgram todata extDic=(null)
2021-11-02 14:00:17.676124+0800 UniPluginDemo[13213:697947] WeChatSDK: wxlog:set property list
2021-11-02 14:00:17.702618+0800 UniPluginDemo[13213:697947] WeChatSDK: wxlog:Error:fail to load Keychain status:-25300, keyData null:1
2021-11-02 14:00:17.702770+0800 UniPluginDemo[13213:697947] WeChatSDK: wxlog:token[(null)] is null
2021-11-02 14:00:17.799936+0800 UniPluginDemo[13213:697771] WeChatSDK: wxlog:launch app with ul only success
2021-11-02 14:00:17.800116+0800 UniPluginDemo[13213:697771] WeChatSDK: wxlog:launch app with universal link, ret:1
2021-11-02 14:00:17.800223+0800 UniPluginDemo[13213:697771] WeChatSDK: wxlog:req:<WXLaunchMiniProgramReq: 0x283e584c0>, cid:069fd21198f2b9a844d51f456c75d3a3a8a77821c7ae8953215124a507b64d72
之后添加了微信SDK自检函数
//调用自检函数
[WXApi checkUniversalLinkReady:^(WXULCheckStep step, WXCheckULStepResult* result) {
if(YES){
NSLog(@"WeChat checkUniversalLinkReady成功 %@, %u, %@, %@", @(step), result.success, result.errorInfo, result.suggestion);
}else{
NSLog(@"WeChat checkUniversalLinkReady失败 %@, %u, %@, %@", @(step), result.success, result.errorInfo, result.suggestion);
}
}];
输出日志如下
2021-11-02 14:04:42.607998+0800 UniPluginDemo[13302:700616] WeChat checkUniversalLinkReady成功 0, 1, check passed,
2021-11-02 14:04:42.615592+0800 UniPluginDemo[13302:700616] WeChat checkUniversalLinkReady成功 1, 1, check passed,
5 UniPluginDemo 0x000000010113fa54 +[WXApi checkUniversalLinkReady:] + 628
5 UniPluginDemo 0x000000010113fa54 +[WXApi checkUniversalLinkReady:] + 628
2021-11-02 14:04:42.897823+0800 UniPluginDemo[13302:700616] WeChat checkUniversalLinkReady成功 2, 1, check passed,
2021-11-02 14:04:43.220915+0800 UniPluginDemo[13302:700616] WeChat checkUniversalLinkReady成功 3, 1, check passed,
5 UniPluginDemo 0x000000010113fb90 +[WXApi checkUniversalLinkReady:] + 944
2021-11-02 14:04:43.780810+0800 UniPluginDemo[13302:700347] WeChat checkUniversalLinkReady成功 4, 1, check passed,
进行到第四步以后不再输出后续日志程序反应为跳转到微信提示Universal Link校验不通过点击确定之后返回原app