I have added applinks: example.com in my Xcode entitlements
This his my My app-site-association which I uploaded in web https://<fully qualified domain>/.well-known/apple-app-site-association
:
{
"applinks": {
"details": [
{
"appIDs": [
"ABCDEF.com.abcdef.example"
],
"components": [
{
"/": "/service/test",
"comment": "Matches URL with a path /service/test"
}
]
}
]
},
"webcredentials": {
"apps": [
"ABCDEF.com.abcdef.example"
]
}
}
My web credentials is working but not universal links
Below function is never called. I tried adding breakpoint and writing print statement
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool
First you need to check your Universal link Apple App Site Association(AASA). If your code is not triggering inside userActivity try validator first. And also your json looks wrong there is unnecessary comma inside appIDs.
Asa Validator: https://branch.io/resources/aasa-validator/
After that do not forget check NSUserActivityTypeBrowsingWeb
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
if userActivity.activityType == NSUserActivityTypeBrowsingWeb {
}
}