When I shared the link in a social media, and then tap on the link, he redirect to my app. That's is OK. But doesn't start again app if I put it in background with my session open. In Android he made it. When shared the link in WhatsApp, for example, and select the link, he redirected me to app at the beginning, i mean the login page, no matter if i leaved the app with the session open.
Exists some configuration to permits the same behavior in iOS?
EDIT: I have this fragment code from deeplinks plugin
- (BOOL)handleContinueUserActivity:(NSUserActivity *)userActivity {
if (![userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb] || userActivity.webpageURL == nil) {
return NO;
}
NSURL *url = userActivity.webpageURL;
_lastEvent = [self createResult:url];
NSLog(@"sexto void");
NSLog(@"IonicDeepLinkPlugin: Handle continueUserActivity (internal) %@", url);
[self sendToJs];
return NO;
}
- (void) sendToJs {
// Send the last event to JS if we have one
if (_handlers.count == 0 || _lastEvent == nil) {
return;
}
// Iterate our handlers and send the event
for (id callbackID in _handlers) {
[self.commandDelegate sendPluginResult:_lastEvent callbackId:callbackID];
}
// Clear out the last event
_lastEvent = nil;
}
- (CDVPluginResult *)createResult:(NSURL *)url {
NSLog(@"septimo void");
NSDictionary* data = @{
@"url": [url absoluteString] ?: @"",
@"path": [url path] ?: @"",
@"queryString": [url query] ?: @"",
@"scheme": [url scheme] ?: @"",
@"host": [url host] ?: @"",
@"fragment": [url fragment] ?: @""
};
When I tap the link, this fragment execute. I want to close my app and force to start again and show the login page like happens in Android