微信分享,由于应用universal link校验不通过,无法完成分享?
我之前申请appid的时候是填写的以前用过的universal links链接,没有配置apple-app-site-association,访问也是500错误,申请下来后,分享一切正常。后面我想改掉universal links并配置了apple-app-site-association,并且通过safari打开universal links地址,可以成功跳转到app。但是一直提示由于应用universal link校验不通过。 已经完成的自检: 1、已经配置好了apple-app-site-association文件并且能访问成功 2、通过Safari可以打开app 3、配置了Associated Domains 4、微信开放平台填写的universal links地址和WXApi.registerApp传入的universalLink一致 我通过SDK提供的API检测: WXApi.startLog(by: WXLogLevel.detail) { (message) in
console("wxapi:\(message)")
}
// 日志
wxapi:wxlog:set property list
wxapi:wxlog:launch app with ul only success
wxapi:wxlog:Successfully starting WeChat with the universal link.
wxapi:wxlog:Error:universal link check enable but contextId is error., contextID:(null)
wxapi:wxlog:clear property list
wxapi:wxlog:command:2020
WXApi.registerApp(WX_APP_ID, universalLink: UNIVERSAL_LINK)
WXApi.checkUniversalLinkReady { (setp, result) in
console("setp:\(setp.rawValue), success:\(result.success), errorInfo:\(result.errorInfo), suggestion:\(result.suggestion)")
}
// 只执行了5个步骤,全是返回true
setp:0, success:true, errorInfo:check passed, suggestion:
setp:1, success:true, errorInfo:check passed, suggestion:
setp:2, success:true, errorInfo:check passed, suggestion:
setp:3, success:true, errorInfo:check passed, suggestion:
setp:4, success:true, errorInfo:check passed, suggestion:
// 跳转微信错误提示:
PBItemCollectionServicer connection disconnected.
// 重写了回调方法
extension AppDelegate: WXApiDelegate {
func application(_ application: UIApplication, handleOpen url: URL) -> Bool {
return WXApi.handleOpen(url, delegate: self)
}
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
return WXApi.handleOpen(url, delegate: self)
}
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
return WXApi.handleOpenUniversalLink(userActivity, delegate: self)
}
func onReq(_ req: BaseReq) {
console("onReq:\(req)")
}
func onResp(_ resp: BaseResp) {
console("onResp:\(resp)")
}
}
求大佬们看看这是啥原因,难道是注册appid后,再也无法修改universal links了吗?