Skip to content

Commit 8b7567a

Browse files
committed
新增NativeUI.OpenURL
1 parent 347789e commit 8b7567a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Plugins/Native/Implementations/NativeUI.mm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ +(void)OpenUrl:(NSString *)url
2525
NSURL * nsUrl = [NSURL URLWithString:url];
2626

2727
if(nsUrl == nil)
28-
{
2928
return;
30-
}
31-
[[UIApplication sharedApplication] openURL:nsUrl options:@{} completionHandler:nil];
29+
if([[UIApplication sharedApplication] canOpenURL:nsUrl])
30+
[[UIApplication sharedApplication] openURL:nsUrl options:@{} completionHandler:nil];
3231
}
3332

3433
+(void)SafariViewFromUrl:(NSString *)url onCompletionCallback:(CompletionCallback)callback

0 commit comments

Comments
 (0)