Skip to content

Commit 11ba4c4

Browse files
j--wJim Wright
andauthored
[apacheGH-652] add check for openInSystem postNotification (apache#654)
Co-authored-by: Jim Wright <[email protected]>
1 parent 7a856be commit 11ba4c4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ios/CDVWKInAppBrowser.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,10 @@ - (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options
357357

358358
- (void)openInSystem:(NSURL*)url
359359
{
360-
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
361-
[[UIApplication sharedApplication] openURL:url];
360+
if ([[UIApplication sharedApplication] openURL:url] == NO) {
361+
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
362+
[[UIApplication sharedApplication] openURL:url];
363+
}
362364
}
363365

364366
- (void)loadAfterBeforeload:(CDVInvokedUrlCommand*)command

0 commit comments

Comments
 (0)