[iOS] Fix crash at unknown firebase url

This commit is contained in:
Bilal Syed 2018-07-09 22:48:55 +03:00
parent 5ad351b279
commit b773717d1a
1 changed files with 4 additions and 4 deletions

View File

@ -60,11 +60,11 @@ continueUserActivity:(NSUserActivity *)userActivity
return [[FIRDynamicLinks dynamicLinks]
handleUniversalLink:userActivity.webpageURL
completion:^(FIRDynamicLink * _Nullable dynamicLink, NSError * _Nullable error) {
if (error != nil){
NSLog(@"Failed to handle universal link: %@", [error localizedDescription]);
} else {
NSURL* url = dynamicLink ? dynamicLink.url : userActivity.webpageURL;
if (dynamicLink && dynamicLink.url) {
NSURL* url = dynamicLink.url;
[self sendJSEvent:self name:LINKS_LINK_RECEIVED body:url.absoluteString];
} else {
NSLog(@"Failed to handle universal link: %@", userActivity.webpageURL);
}
}];
}