Merge branch 'master' of https://github.com/uareurapid/cordova-plugin-inappbrowser
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index 986cfa9..b7820f3 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -390,7 +390,14 @@
[self.commandDelegate sendPluginResult:pluginResult callbackId:scriptCallbackId];
return NO;
}
- } else if ((self.callbackId != nil) && isTopLevelNavigation) {
+ }
+ //if is an app store link, let the system handle it, otherwise it fails to load it
+ else if ([[ url scheme] isEqualToString:@"itms-appss"] || [[ url scheme] isEqualToString:@"itms-apps"]) {
+ [theWebView stopLoading];
+ [self openInSystem:url];
+ return NO;
+ }
+ else if ((self.callbackId != nil) && isTopLevelNavigation) {
// Send a loadstart event for each top-level navigation (includes redirects).
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
messageAsDictionary:@{@"type":@"loadstart", @"url":[url absoluteString]}];