在iOS14以上的版本调试Universal Links

755 阅读1分钟

从 macOS 11 和 iOS 14 开始,apps 不再将 apple-app-site-association 文件的请求直接发送到您的 Web 服务器。 相反,他们将这些请求发送到 Apple 管理的内容交付网络 (CDN)专门管理 associated domains 的地方

当你在开发你的app时,如果你的web server是不出公网的,只供内部访问的,你可以用 alternate mode 功能来绕过上述中的(CDN)来连接你的私有域名(仅限development profile)

例如:

applinks:xxxx.com?mode=developer
applinks:xxxx.com?mode=managed
developer:可以使设备主动访问任何域名,包括不被系统信任的,前提是必须使用 development profile 运行app,adhoc、release都不支持
managed:不常用,主要用于企业级账号 MDM 
Starting with macOS 11 and iOS 14, apps no longer send requests for `apple-app-site-association` files directly to your web server. Instead, they send these requests to an Apple-managed content delivery network (CDN) dedicated to associated domains.
    
While you’re developing your app, if your web server is unreachable from the public internet, you can use the alternate mode feature to bypass the CDN and connect directly to your private domain.
    
You enable an alternate mode by adding a query string to your associated domain’s entitlement as follows:

<service>:<fully qualified domain>?mode=<alternate mode>

associated-dimains

alternate mode

关于 MDM,请看这里