ios - 在 iOS 14 上使用通用链接
问题描述
我正在创建一个应用程序,我想使用Universal Links
. 我已经关注了,Apple Documentation
但是当我打开我的时,我URL
看不到将浏览器与我的应用程序链接的按钮。这里有一些细节:
苹果应用程序站点关联文件
{
"applinks":{
"details":[
{
"appIDs":[
"[TEAM-ID].[BUNDLE-ID]"
],
"components":[
{
"#":"no_universal_links",
"exclude":true,
"comment":"Matches any URL whose fragment equals no_universal_links and instructs the system not to open it as a universal link"
},
{
"/":"/store",
"comment":"Matches any URL whose path starts with /store"
},
{
"/":"/product",
"comment":"Matches any URL whose path starts with /product"
},
{
"/":"/category",
"comment":"Matches any URL whose path starts with /category"
}
]
}
]
},
"webcredentials":{
"apps":[
"[TEAM-ID].[BUNDLE-ID]"
]
}
}
AppDelegate.swift
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
print("Handled it!")
guard let url = userActivity.webpageURL else {return false}
print(url)
return false
}
附言。我没有显示我的域名,因为它是机密信息
非常感谢大家的支持
解决方案
推荐阅读
- javascript - 关于在标签中本地导入和从 Web 导入
- html - CSS Flexbox (start,center,end) on fullscreen
- javascript - Discord js - How to keep reacting to a message and editing the embed till a given time period
- javascript - Test multiple states making http requests
- sql - PostgreSQL select and count column from table on different conditions
- java - Two separate stream operations merged into one
- vue.js - 如何更改 vuetify 主题背景颜色
- java - Java nio Files: readAllBytes vs readAllLines ? Which to use when?
- python - Python Scrapy - How can I reset/clear memory of visited urls for scrapy "dont_filter=False"?
- python - TKinter syntax to creat widget