我正在创建一个应用程序,我想使用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
}
附言。我没有显示我的域名,因为它是机密信息
非常感谢大家的支持