一、配置好應(yīng)用的Universal Links
1、登錄蘋果開發(fā)者賬號(hào)進(jìn)入對(duì)應(yīng)的appid,開通Associated Domains

并在這個(gè)頁面獲取Team id 和 bundle id

2、創(chuàng)建文件名"必須"為apple-app-site-association的文件
由于:Universal Links必須支持https,Universal Links配置的文件(apple-app-site-association文件)paths不能帶query參數(shù),微信使用Universal Links拉起第三方App時(shí),會(huì)在Universal Links末尾拼接路徑和參數(shù),因此App配置(apple-app-site-association文件)的paths必須加上通配符
(apple-app-site-association)文件格式為:
{
"applinks": {
"apps": [],
"details": [{
"appID": "TeamId.BundledId",
"paths": [ "*","/app/*"]
}]
}
}
path是設(shè)定你的app支持的路徑列表,只有訪問到域名下對(duì)應(yīng)path的地址才會(huì)喚起APP。其中可以使用通配符或者/app/,/app/*是自己定義的路徑。
3、將你配置好的指定文件apple-app-site-association,上傳到HTTPS服務(wù)器的根目錄下或者.well-known目錄下,app在請(qǐng)求下載這個(gè)文件時(shí)優(yōu)先從.well-known下載,如果請(qǐng)求不到文件,才會(huì)從根目錄下載。
4、在工程配置以 applinks: 開頭,后面寫上域名.

5、在微信開放平臺(tái)(https://open.weixin.qq.com/)配置universal links
