1.首先排查
原來apple-app-site-association文件是放到根目錄下拜姿,但是現(xiàn)在要求放到
.well-known目錄下
https://<fully qualified domain>/.well-known/apple-app-site-association
并且域名不能重定向
You must host the file using https:// with a valid certificate and with no redirects.
https://developer.apple.com/documentation/safariservices/supporting_associated_domains
2.在ios13之前的設(shè)備可以通過universal link打開app,但是ios14不能打開了
原因是在ios13訪問apple-app-site-association文件是通過設(shè)備去訪問的冯遂,ios14之后是由apple的服務(wù)器區(qū)去訪問蕊肥。我們的問題是設(shè)備在本地網(wǎng)絡(luò)下能訪問到apple-app-site-association文件,但是蘋果服務(wù)器訪問走的是海外網(wǎng)絡(luò)蛤肌,ssl證書有問題導(dǎo)致不能訪問到apple-app-site-association文件壁却。修改這個問題之后就能順利的打開app了。
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.