msmtamburro commented on a change in pull request #1030:
URL: https://github.com/apache/cordova-ios/pull/1030#discussion_r532883202



##########
File path: CordovaLib/Classes/Public/CDVURLSchemeHandler.m
##########
@@ -39,45 +41,70 @@ - (void)webView:(WKWebView *)webView startURLSchemeTask:(id 
<WKURLSchemeTask>)ur
     NSURL * url = urlSchemeTask.request.URL;
     NSString * stringToLoad = url.path;
     NSString * scheme = url.scheme;
-
-    if ([scheme isEqualToString:self.viewController.appScheme]) {
-        if ([stringToLoad hasPrefix:@"/_app_file_"]) {
-            startPath = [stringToLoad 
stringByReplacingOccurrencesOfString:@"/_app_file_" withString:@""];
-        } else {
-            if ([stringToLoad isEqualToString:@""] || [url.pathExtension 
isEqualToString:@""]) {
-                startPath = [startPath 
stringByAppendingPathComponent:self.viewController.startPage];
-            } else {
-                startPath = [startPath 
stringByAppendingPathComponent:stringToLoad];
+    
+    CDVViewController* vc = (CDVViewController*)self.viewController;
+
+    /*
+     * Give plugins the chance to handle the url
+     */
+    BOOL anyPluginsResponded = NO;
+    BOOL handledRequest = NO;
+
+    for (NSString* pluginName in vc.pluginObjects) {

Review comment:
       I updated https://github.com/apache/cordova-ios/issues/900 with an 
example of a protocol that you could use here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to