问题描述:在公司测试服务器A中点击微信分享正常,更换服务器B后点击微信分享跳转微信两次,多次分享还是跳转两次,A服务器一直正常。
主要报错:wxlog:Error:universal link check enable but contextId is error., contextID:c43c83999f64aab47005975410b58e174b712c6e
错误日志:
WeChatSDK: wxlog:set property list
WeChatSDK: change into print log by other block
0, 1, check passed,
1, 1, check passed,
2, 1, check passed,
微信文字分享log : wxlog:set property list
3, 1, check passed,
PBItemCollectionServicer connection disconnected.
PBItemCollectionServicer connection disconnected.
微信文字分享log : wxlog:launch app with ul only success
微信文字分享log : wxlog:launch app with universal link, ret:1
微信文字分享log : wxlog:req:<SendMessageToWXReq: 0x282e19ac0>, cid:c43c83999f64aab47005975410b58e174b712c6e
PBItemCollectionServicer connection disconnected.
微信文字分享log : wxlog:launch app with ul only success
4, 1, check passed,
微信文字分享log : wxlog:Successfully starting WeChat with the universal link.
Can't end BackgroundTask: no background task exists with identifier 2 (0x2), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug
wxlog:Error:universal link check enable but contextId is error., contextID:c43c83999f64aab47005975410b58e174b712c6e
wxlog:handle resend context req by scheme
wxlog:clear context
wxlog:context req:<SendMessageToWXReq: 0x282e19ac0>
你的问题解决了吗
你好,请参考:微信开放平台App iOS端接入新版本SDK 常见问题自查指引? - 微信开放社区 https://developers.weixin.qq.com/community/develop/doc/000ce0403bc9d0ea1a0a67f415b409
domains配置如下:
applinks:A-A.test.com
applinks:B-B-B.test.com
代码中和微信平台Universal Link配置如下:
https://A-A.test.com/app名称/
https://B-B-B.test.com/app名称/
服务器中apple-app-site-association文件链接地址为:
https://A-A.test.com/app名称/
https://B-B-B.test.com/app名称/
服务器中apple-app-site-association文件中代码如下:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "TeamID+.+BundleID",
"paths": ["/app名称/*"]
}
]
}
}