Skip to content

Commit

Permalink
fix(ios): Allow loading local html files (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpalou authored May 16, 2020
1 parent 8aaae5b commit dcfe692
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ios/CDVWKInAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,12 @@ - (void)close

- (void)navigateTo:(NSURL*)url
{
NSURLRequest* request = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:request];
if ([url.scheme isEqualToString:@"file"]) {
[self.webView loadFileURL:url allowingReadAccessToURL:url];
} else {
NSURLRequest* request = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:request];
}
}

- (void)goBack:(id)sender
Expand Down

0 comments on commit dcfe692

Please sign in to comment.