问题描述
我正在创建一个应用程序,我想使用 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 (将#修改为@)