关于iOS系统中, 从HTML5拉起 app的机制,通常都会用到Univeral link的几个重要勘误如下

 

Universal link支持二级域名,乃至三级域名,已经过验证。网传的不支持三级域名并不正确。apple的官方文档中,也只是提到在app的associate domains设置的域名列表中可以使用通配符*,并且遵循最长匹配规则进行匹配。官方原文如下

To match all subdomains of an associated domain, you can specify a wildcard by prefixing *. before the beginning of a specific domain (the period is required). Domain matching is based on the longest substring in the applinks entries. For example, if you specify the entries applinks:*.mywebsite.com and applinks:*.users.mywebsite.com, matching for the domain emily.users.mywebsite.com is performed against the longer *.users.mywebsite.com entry. Note that an entry for *.mywebsite.com does not match mywebsite.com because of the period after the asterisk. To enable matching for both *.mywebsite.com and mywebsite.com, you need to provide a separate applinks entry for each.

  1.      associate domains 最多支持20-30个域名。
  2.      appdelegate.m 必须实现application:continueUserActivity:restorationHandler:这个方法
  3.   如果使用三级域名,二级域名和一级域名必须也同时支持ssl证书。
  4.   修改apple-app-site-association文件并上传后,建议重新安装app,安装时必须保证互联网畅通,不能通过诸如charles这样的代理下载安装。否则不能保证,这个文件生效,不能保证拉起能生效。

  

 

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐