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 B848F17AB6 for ; Thu, 25 Jun 2015 01:08:52 +0000 (UTC) Received: (qmail 8993 invoked by uid 500); 25 Jun 2015 01:08:50 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 8954 invoked by uid 500); 25 Jun 2015 01:08:50 -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 7882 invoked by uid 99); 25 Jun 2015 01:08:50 -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; Thu, 25 Jun 2015 01:08:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 47A5FE3651; Thu, 25 Jun 2015 01:08:50 +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 Date: Thu, 25 Jun 2015 01:09:28 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [40/50] ios commit: CB-8812 - protocol hander raises error on second firing CB-8812 - protocol hander raises error on second firing Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/bd6d86be Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/bd6d86be Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/bd6d86be Branch: refs/heads/master Commit: bd6d86be9b8684b95e067ec20336ab9ba2892b35 Parents: 622ca4b Author: Shazron Abdullah Authored: Wed May 27 17:59:32 2015 -0700 Committer: Shazron Abdullah Committed: Wed May 27 17:59:32 2015 -0700 ---------------------------------------------------------------------- .../CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bd6d86be/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m index b660638..38e8d24 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m +++ b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m @@ -89,6 +89,14 @@ NSURL* url = [request URL]; CDVViewController* vc = (CDVViewController*)self.enginePlugin.viewController; + // Push these system schemes off to the system, and do not let the UIWebView handle them + if ([request.URL.scheme isEqualToString:@"maps"] || + [request.URL.scheme isEqualToString:@"tel"] || + [request.URL.scheme isEqualToString:@"telprompt"]) { + [[UIApplication sharedApplication] openURL:url]; + return NO; + } + /* * Execute any commands queued with cordova.exec() on the JS side. * The part of the URL after gap:// is irrelevant. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org