我在我的HTTPS根目錄(kumpul.co.id/apple-app-site-association)中提供apple-app-site-association並且結果從https://branch.io/resources/aasa-validator/#resultsbox通用鏈接不適用於iOS 10.2
我已經在我的權利配置的:applinks:kumpul.co.id
,我已經把這個功能在我Appdelegate.swift:
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
NSLog("Check Universal Link")
// 1
guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
let url = userActivity.webpageURL,
let components = URLComponents(url: url, resolvingAgainstBaseURL: true) else {
return false
}
print("url: \(url)")
print("component: \(components)")
// 2
if let match = MatchHandler.sharedInstance.items.filter({ $0.path == components.path}).first {
self.presentMatch(match)
return true
}
//3
let webpageUrl = URL(string: "http://www.kumpul.co.id")!
application.openURL(webpageUrl)
return false
}
對於路徑,我設置的「路徑「:[」/ match/*「],因爲鏈接爲kumpul.co.id/match/play_2.html例如
但是當我點擊我的鏈接上WhatsApp或線消息,此功能根本不會被調用,我看不到日誌時,我點擊鏈接。我在這裏做錯了什麼?
邏輯當我檢查我的鏈接(HTTPS://www.kumpul.co.id.match/play_70.html)上HTTPS ://search.developer.apple.com/appsearch-validation-tool/,它表示「錯誤沒有帶域名權利的應用程序 用於驗證深層鏈接雙重身份驗證的權利數據來自您當前的應用程序發佈版本。可能需要48小時才能更新。「 但是,從https://branch.io/resources/aasa-validator/#resultsbox,它通過了所有的驗證,這是怎麼發生的?我已將我的權利添加到我的項目中作爲applinks:kumpul.co.id –
這是「App Search API驗證工具」,而不是「通用鏈接驗證工具」(Apple不存在)。這個工具的結果與Universal Links是否工作無關 –