I have made the changes for firebase integration using link https://firebase.google.com/docs/dynamic-links/ios following are the handling done to handle URL and navigate the user to respective screen. for iOS version below 9.0 the appdelegate's openURL method is called and I am able to get the URL. But for iOS version 9.0 and above I am getting call in app delegate's ContinueUserActivity method and in that I am getting nil value of dynamicLink.url.
I am not able to understand the reason why I am not able to get the Url.
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray * _Nullable))restorationHandler {
NSLog(@"Short URl : %@",userActivity.webpageURL);
__weak AppDelegate *weakSelf = self;
BOOL handled = [[FIRDynamicLinks dynamicLinks]
handleUniversalLink:userActivity.webpageURL
completion:^(FIRDynamicLink * _Nullable dynamicLink,
NSError * _Nullable error) {
AppDelegate *strongSelf = weakSelf;
[strongSelf handleReceivedLink:dynamicLink];
}];
return handled;
}
-(void)handleReceivedLink:(FIRDynamicLink*)dynamicLink{
NSString* urlString = [NSString stringWithFormat:@"%@",dynamicLink.url];
NSLog(@"Extended URL : %@",urlString);
}