[GH-652] add check for openInSystem postNotification (#654)

Co-authored-by: Jim Wright <jim.wright@masabi.com>
This commit is contained in:
Jim Wright 2020-03-30 11:47:30 +01:00 committed by GitHub
parent 7a856bec60
commit 11ba4c4e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -357,8 +357,10 @@ static CDVWKInAppBrowser* instance = nil;
- (void)openInSystem:(NSURL*)url
{
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
[[UIApplication sharedApplication] openURL:url];
if ([[UIApplication sharedApplication] openURL:url] == NO) {
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
[[UIApplication sharedApplication] openURL:url];
}
}
- (void)loadAfterBeforeload:(CDVInvokedUrlCommand*)command