Merge pull request #1287 from bilalsyed001/master

[iOS] Fix crash at unknown firebase url
This commit is contained in:
Michael Diarmid 2018-07-10 15:26:16 +01:00 committed by GitHub
commit 8733efa14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 && error == nil) {
NSURL* url = dynamicLink.url;
[self sendJSEvent:self name:LINKS_LINK_RECEIVED body:url.absoluteString];
} else {
NSLog(@"Failed to handle universal link: %@", userActivity.webpageURL);
}
}];
}