Reputation: 2061
I am using Apple Universal Links concept to read/get shared Link or URL (user clicked on it through Message, Email and other social apps) inside continueUserActivity
method in my app.
If the user clicked on link and the app is already installed on device then the continueUserActivity
method is called and working fine.
If the user clicked on link and the app is not installed on device then the link automatically redirects to the Apple Store to install the app (used javascript), after installing the app if you open it then the continueUserActivity
method does not call at all. Does continueUserActivity
method call if you install the app from Apple Store and open it? am I missing anything? please help me on it.
I'm testing it on device with iOS 9.3.1
-(BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray * restorableObjects))restorationHandler {
if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
if ([[userActivity.webpageURL absoluteString] hasSuffix:@"12345"]) {
// Open Item details view controller
}
}
return YES;
}
Upvotes: 3
Views: 2445
Reputation: 13514
For that kind of task you will need to create backend like when that link is tapped then create a session for that particular device and when the application gets open call an API in background that will check the session for that device and then will response the params. You will need to manage much things in the above case. If you don't mind using third party then go for Branch.io they will handle all kind of stuffs you want and will not cause a pain in development.
Upvotes: 8