配置 https://developer.apple.com/documentation/safariservices/supporting_associated_domains_in_your_app?language=objc#3001215
验证 https://search.developer.apple.com/appsearch-validation-tool/
添加Associated Domains Entitlement
TARGETS -> Signing & Capabilities -> + Capability -> Associated Domains
applinks:域名
手动配置证书:需要到证书管理页面,找到对应的IDENTIFIER
,并勾选Associated Domains
自动配置证书:无需手动操作,自动处理
注意:此时,对应的Profiles
会状态会变成Invalid
,需要重新编辑保存;
添加apple-app-site-association
文件
需要服务器开发人员配合,将此文件上传至域名根目录的.well-known
文件夹中
apple-app-site-association
文件内容:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "ABCDE12345.com.example.app",
"paths": [ "/app/*"]
}
]
}
}
其中,appID为Team ID.Bundle Identifier
, paths中的/app/*
为自定义路径,需要根据具体需求设置(注意: 如果配置微信平台的Universal Links,则需要在域名的后边加上此处添加的路径,否则微信分享成功后无法返回原App)
服务器配置注意事项:
apple-app-site-association
文件名固定,不能修改,不能加后缀;验证
浏览器输入https://<fully qualified domain>/.well-known/apple-app-site-association
可以正确显示apple-app-site-association
文件内容,或下载文件;
使用验证工具测试:https://search.developer.apple.com/appsearch-validation-tool/
手机浏览器输入域名+路径+其他
地址,下拉页面可以显示打开App提示;(注意: 使用这种验证方式,修改配置文件后需要卸载重装App后,配置才会生效)
参考: 上述配置步骤描述的比较简单,可以参考下面几篇文章配置
修改Xcode配置中的域名或更新服务器文件apple-app-site-association
内容后,需要卸载App重新安装,然后在浏览器验证才能看到验证效果,否则显示为之前缓存的结果;
如果apple-app-site-association
中的path设置了路径:比如/app/*
,则微信后台设置的Universal Links需要加上/app/
路径,否则分享成功后,无法返回;
本文地址:https://blog.csdn.net/jinrui_w/article/details/107189671
如对本文有疑问, 点击进行留言回复!!
O - Steady Cow Assignment POJ - 3189(二分 + 多重匹配)
L - Cat VS Dog HDU - 3829(最大独立集)
M - Jamie‘s Contact Groups POJ - 2289(二分 + 多重匹配)
网友评论