iOS Universal links 遇到问题

1. 官网的一个 Q & A

Technical Q&A QA1919: Incoming requests for /.well-known/apple-app-site-association file

Q: Why is my web server receiving requests for https://example.com/.well-known/apple-app-site-association?

A: The recently released iOS 9.3 update implements RFC 5785 . Because of this, devices running iOS 9.3 will first request /.well-known/apple-app-site-association for the apple-app-site-association file that is required to implement Universal Links and Shared Web Credentials . If the file is not found in this location, then the device will request the file in the root of the web server, as with prior releases of iOS 9.

2. 我们遇到的问题

运维监控到 url 请求 https://example.com/.well-known/apple-app-site-association 报错 404。

问题:为什么服务器收到 https://example.com/.well-known/apple-app-site-association? 请求

答案: iOS 9.3 设备下载 app 时将首次请求 https://example.com/.well-known/apple-app-site-association 获取 Universal links (通用链接,深度唤醒)所需的 apple-app-site-association 文件,如果当前路径找不到,则像 iOS 9 那样调用 https://app.ch.com/apple-app-site-association 获取。

产生 404 原因: 我们 app 的配置文件放在了服务器的根目录下, /.well-known 目录下不存在该文件,请求时候报 404 错,接着去根目录下查找 apple-app-site-association 文件,可以获取配置信息,功能上没问题。

解决方法: 将根目录下 apple-app-site-association 文件拷贝一份到 /.well-known 目录下。

你可能感兴趣的:(iOS Universal links 遇到问题)