CB-10040 - re-fix: backwards compatible with cordova-ios < 4.0
This commit is contained in:
parent
9b576f303b
commit
542536f790
@ -231,11 +231,18 @@
|
|||||||
|
|
||||||
- (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options
|
- (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options
|
||||||
{
|
{
|
||||||
NSURLRequest* request = [NSURLRequest requestWithURL:url];
|
NSURLRequest* request = [NSURLRequest requestWithURL:url];
|
||||||
|
|
||||||
#ifdef __CORDOVA_4_0_0
|
#ifdef __CORDOVA_4_0_0
|
||||||
[self.webViewEngine loadRequest:request];
|
// the webview engine itself will filter for this according to <allow-navigation> policy
|
||||||
|
// in config.xml for cordova-ios-4.0
|
||||||
|
[self.webViewEngine loadRequest:request];
|
||||||
#else
|
#else
|
||||||
|
if ([self.commandDelegate URLIsWhitelisted:url]) {
|
||||||
[self.webView loadRequest:request];
|
[self.webView loadRequest:request];
|
||||||
|
} else { // this assumes the InAppBrowser can be excepted from the white-list
|
||||||
|
[self openInInAppBrowser:url withOptions:options];
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user