iOS Universal Link 配置

Apple 官网描述

官方验证可行性:

curl -v https://app-site-association.cdn-apple.com/a/v1/your domain

apple-app-site-association 文件内容

{
  "applinks": {
      "details": [
           {
             "appIDs": [ "TeamID.BoundleID" ],
             "components": [
               {
                  "/": "/匹配的路径/*",
                  "comment": "注释,匹配路径下都会有“打开”提示"
               }
             ]
           }
       ]
   }
}
cd /xxx
touch apple-app-site-association
vim apple-app-site-association

nginx 配置

# iOS Universal Link 配置,在用户打开这个链接时可以无缝重定向到对应的APP,且不需要通过Safari浏览器。
location /.well-known/apple-app-site-association {
  alias /xxx/apple-app-site-association;
  add_header Content-Type application/json;
}

location /apple-app-site-association {
  alias /xxx/apple-app-site-association;
  add_header Content-Type application/json;
}
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容