I'm trying to implement Universal Links in my app. I read a lot of tutorials and followed this one to the letter: How to support Universal Links in iOS App and setup server for it?
When I click a universal link my app successfully opens but application:continueUserActivity:restorationHandler
in my AppDelegate.m file isn't called so I can't direct to a specific page in the app.
My apple-app-site-association
file is on https and for paths I put [ "*", "/" ]
. I triple-checked app prefix and ID, confirmed AssociatedDomains is enabled both on the developer website and in my target. In the Associated Domains section I put my root domain as well as a second entry prepended with *. to handle all possible subdomains. I am testing on a real device, not on the simulator.
-(BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler {
ALog(@"Did I get here?");
}
Can anyone provide advice as to what I should be looking at to figure out why application:continueUserActivity:restorationHandler
isn't being called?
Update:
I used Apple's validation tool https://search.developer.apple.com/appsearch-validation-tool and it gave this result:
Link to Application
Action required
Could not extract required information for Universal Links. Learn how to implement the recommended Universal Links.
Error no apps with domain entitlements The entitlement data used to verify deep link dual authentication is from the current released version of your app. This data may take 48 hours to update.
I don't know if that has anything to do with my problem. I wouldn't think so, because I need to test my app to make sure I have Universal Links implemented properly before actually releasing the update.
continueUserActivity
handler isn't called? – Somersomersapplication:openURL:sourceApplication:annotation
gets called, but again have no idea why. According to the documentationapplication:continueUserActivity:restorationHandler
should be called. – Preussenmydomain://phase1/phase2?key1=var1&key2=var2#hash
. My current workaround is to just useapplication:openURL:sourceApplication:annotation
but I'd still like to know why that is triggering andapplication:continueUserActivity:restorationHandler
is not. – PreussenMyCustomSceme://phase1/
which I guess is only for deep linking... so universal links are supposed to look like web links, e.g.http://example.com/phase1/
? If that's the case then I'm not as close to figuring it out as I thought, because those links do not open my app. – Preussen