My requirement is to handle universal links on the iOS application. But the dynamic link.url seems to be returning an error as below -
\"@\"error\" : @\"unauth
Try this one.
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler
{
NSURL *url = userActivity.webpageURL;
FIRDynamicLinks *links = [FIRDynamicLinks dynamicLinks];
if([links matchesShortLinkFormat:url])
{
[links resolveShortLink:url completion:^(NSURL * _Nullable url, NSError * _Nullable error)
{
NSString *message =
[NSString stringWithFormat:@"Deep link \n:%@",
url];
[[[UIAlertView alloc] initWithTitle:@"Deep-link Data"
message:message
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil] show];
}];
return YES;
}
return false;
}