Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D9D5418F84 for ; Fri, 20 Nov 2015 18:53:43 +0000 (UTC) Received: (qmail 29581 invoked by uid 500); 20 Nov 2015 18:53:43 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 29553 invoked by uid 500); 20 Nov 2015 18:53:43 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 29544 invoked by uid 99); 20 Nov 2015 18:53:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2015 18:53:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A580BE04D7; Fri, 20 Nov 2015 18:53:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: commits@cordova.apache.org Message-Id: <468555f81e1c4aa0a9b17c7f538f2e02@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cordova-plugin-inappbrowser git commit: CB-10040 - re-fix: backwards compatible with cordova-ios < 4.0 Date: Fri, 20 Nov 2015 18:53:43 +0000 (UTC) Repository: cordova-plugin-inappbrowser Updated Branches: refs/heads/master 9b576f303 -> 542536f79 CB-10040 - re-fix: backwards compatible with cordova-ios < 4.0 Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/542536f7 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/542536f7 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/542536f7 Branch: refs/heads/master Commit: 542536f7908a776ec49becb0bf40969ee4a48a82 Parents: 9b576f3 Author: Shazron Abdullah Authored: Fri Nov 20 10:53:36 2015 -0800 Committer: Shazron Abdullah Committed: Fri Nov 20 10:53:36 2015 -0800 ---------------------------------------------------------------------- src/ios/CDVInAppBrowser.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/542536f7/src/ios/CDVInAppBrowser.m ---------------------------------------------------------------------- diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 28b1bd9..72effaa 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -231,11 +231,18 @@ - (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options { - NSURLRequest* request = [NSURLRequest requestWithURL:url]; + NSURLRequest* request = [NSURLRequest requestWithURL:url]; + #ifdef __CORDOVA_4_0_0 - [self.webViewEngine loadRequest:request]; + // the webview engine itself will filter for this according to policy + // in config.xml for cordova-ios-4.0 + [self.webViewEngine loadRequest:request]; #else + if ([self.commandDelegate URLIsWhitelisted:url]) { [self.webView loadRequest:request]; + } else { // this assumes the InAppBrowser can be excepted from the white-list + [self openInInAppBrowser:url withOptions:options]; + } #endif } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org