sven513 commented on code in PR #778:
URL: 
https://github.com/apache/cordova-plugin-inappbrowser/pull/778#discussion_r1109517438


##########
src/ios/CDVWKInAppBrowser.m:
##########
@@ -1097,7 +1097,8 @@ - (void)close
 - (void)navigateTo:(NSURL*)url
 {
     if ([url.scheme isEqualToString:@"file"]) {
-        [self.webView loadFileURL:url allowingReadAccessToURL:url];
+        NSURL* directoryURL = [url URLByDeletingLastPathComponent];
+        [self.webView loadFileURL:url allowingReadAccessToURL:directoryURL];

Review Comment:
   This fix is really a lifesaver for accessing local resources.
   Fixes "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 
1.)" error for me, and saved my clients apps!
   Any chance this gets committed any time soon?



-- 
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.

To unsubscribe, e-mail: [email protected]

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