需要以下几步
1.developer的CER支持association domain
2.xcode打开association domain,输入支持https的几个域名
3.将xcode生成的或者自己创建的apple-app-site-association文件上传到上述域名下的根目录
{
"applinks": {
"apps": [],
"details": [
{
"appID": "teamID.bundleId”,
"paths": ["/deaplink","/wwdc/news/","*"]
}
]
}
}
4.要显示该条的网页需要添加
<meta name =“apple-itunes-app”content =“app-id = myAppStoreID,affiliate-data = myAffiliateData,app-argument = myURL”>标签
5.代码appdelegate里实现方法
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation