cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [40/50] ios commit: CB-8812 - protocol hander raises error on second firing
Date Thu, 25 Jun 2015 01:09:28 GMT
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 <shazron@apache.org>
Authored: Wed May 27 17:59:32 2015 -0700
Committer: Shazron Abdullah <shazron@apache.org>
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


Mime
View raw message