diff --git a/doric-iOS/Pod/Classes/Plugin/DoricNavigatorPlugin.m b/doric-iOS/Pod/Classes/Plugin/DoricNavigatorPlugin.m index b63368d0..b7e4e1cc 100644 --- a/doric-iOS/Pod/Classes/Plugin/DoricNavigatorPlugin.m +++ b/doric-iOS/Pod/Classes/Plugin/DoricNavigatorPlugin.m @@ -53,12 +53,13 @@ - (void)pop:(NSDictionary *)params { - (void)openUrl:(NSString *)urlString withPromise:(DoricPromise *)promise { dispatch_async(dispatch_get_main_queue(), ^{ NSURL *url = [NSURL URLWithString:urlString]; - if ([[UIApplication sharedApplication] canOpenURL:url]) { - [[UIApplication sharedApplication] openURL:url]; - [promise resolve:nil]; - } else { - [promise reject:@"Cannot open"]; - } + [UIApplication.sharedApplication openURL:url options:@{} completionHandler:^(BOOL success) { + if (success) { + [promise resolve:nil]; + } else { + [promise reject:@"Cannot open"]; + } + }]; }); } @end \ No newline at end of file