### 配置`apple-app-site-association`
需要滿足訪問`https://域名/apple-app-site-association`和`https://域名/.well-known/apple-app-site-association`返回下面json數據結構:
```
{
"applinks": {
"apps": [],
"details": [
{
"appID": "TeamID.bundleID",
"paths": [
"/app/*"
]
}
]
}
}
```
所以在nginx中,可以有如下配置:
```
location /.well-known/apple-app-site-association {
charset UTF-8;
default_type text/html;
return 200 '{\"applinks\":{\"apps\":[],\"details\":[{\"appID\":\"5YSYBT2KPP.com.arxanfintech.rainbowXxcig\",\"paths\":[\"/app/xxcig/*\"]}]}}';
}
location /apple-app-site-association {
charset UTF-8;
default_type text/html;
return 200 '{\"applinks\":{\"apps\":[],\"details\":[{\"appID\":\"5YSYBT2KPP.com.arxanfintech.rainbowXxcig\",\"paths\":[\"/app/xxcig/*\"]}]}}';
}
```
### 在xcode中配置`Associated Domains`

添加兩行
```
applinks:域名
webcredentials:域名
```

### 測試
1. 在[App Search API Validation Tool](https://search.developer.apple.com/appsearch-validation-tool/)網站測試服務器是否配置成功。
輸入網址:`https://域名`。如果出現以下錯誤,不要著急,說明配置是成功的。這是因為你的 app 還沒有上傳到 App Store或TestFlight 的原因。

2. 將app打包構建后,安裝到手機;
3. 將`https://域名/app/`粘貼到iOS自帶的備忘錄,點擊看看,是否能直接打開指定APP?
或者,safari訪問`https://域名/app/`,是否出現如下:

- 前端
- js學習
- 瀏覽器默認樣式
- webpack+vue
- 個人常用webpack打包依賴
- vue使用學習
- vue源碼學習
- webpack5配置babel
- 瀑布流布局
- 個人常用庫
- 其他
- centos搭建ss服務器
- ios配置Universal Links
- pdf2htmlEX使用
- python
- python操作redis
- linux部署Django
- dateutil庫(datetime模塊的擴展).md
- docker部署django
- mysql
- 基礎知識
- 常用函數
- join關聯查詢技巧
- linux
- shell備份mysql數據庫
- crontab定時任務
- centos7安裝部署gitlab服務器
- nginx安裝配置
- 收藏夾
- python
- 博客
- 工具
- 其他
- 前端