如何解决在 iOS 14 上使用通用链接
我正在创建一个应用程序,我想使用 Universal Links
。我已经关注了 Apple Documentation
,但是当我打开 URL
时,我看不到将浏览器与我的应用程序链接的按钮。这里有一些细节:
apple-app-site-association 文件
{
"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
}
附言。我没有显示我的域名,因为它是机密信息
非常感谢大家的支持
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。