universal link在浏览器内可以打开,可以跳转应用,微信开放平台也universal link:"https://xxx.hgold.cn/"
代码中微信在application中注册了
WXApi.registerApp("wxxxxxxx", universalLink: "https://xxx.hgold.cn/");
测试的时候,首次安装是可以出现app与微信的交互,但是分享朋友圈或好友,还是会出现应用未认证。注视掉下面代码,首次安装应用也不显示与微信的交互
WXApi.checkUniversalLinkReady { (step, result) in
print("1----->%@","2----->%@","3-------->%@","4-------->%@",step,result.success,result.errorInfo,result.suggestion)
}
回调也写了
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
return WXApi.handleOpenUniversalLink(userActivity, delegate: self)
}
你好,根据以下文档进行自查。iOS应用出现未验证应用的问题排查:
https://docs.qq.com/doc/DZHNvSGJLS3pqbHNl
微信log----》 wxlog:send req[
微信log----》 wxlog:set property list
微信log----》 wxlog:launch app with ul only success
微信log----》 wxlog:launch app with universal link, ret:1
微信log----》 wxlog:req:
//1、在register之前打开log, 后续可以根据log排查问题
WXApi.startLog(by: WXLogLevel.detail) { (log) in
print("微信log----》",log);
}
//2、务必在调用自检函数前注册
WXApi.registerApp("wxc0d1fd04026exxxx", universalLink: "https://xxx.hgold.cn/");
//3、调用自检函数
WXApi.checkUniversalLinkReady { (step, result) in
print("1----->%@","2----->%@","3-------->%@","4-------->%@",step,result.success,result.errorInfo,result.suggestion)
}
三个方法自己安排查,打开3、自检函数的时候,首次安装有授权跳转,每次关闭app再打开都会授权跳转,注释掉3代码,分享的时候并没有授权跳转,分享完回到app,会走回调方法
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
return WXApi.handleOpenUniversalLink(userActivity, delegate: self)
}
{
"applinks": {
"apps": [],
"details": [{
"appID": "3B94RR37YY.com.fx678.appfinace",
"paths": ["*"]
}
]
}
}
WXApi.registerApp("wxc0d1fd04026exxxx", universalLink: "https://xxx.hgold.cn/");
1----->%@ 2----->%@ 3-------->%@ 4-------->%@ WXULCheckStep true All Check Passed!
微信log----》 wxlog:WXCheckULStepResult[success: 1, errorInfo: Universal Link check passed. The application is launched by WeChat via Universal Link, suggestion: ]
微信log----》 wxlog:WXCheckULStepResult[success: 1, errorInfo: All Check Passed!, suggestion: ]