Skip to content

Commit

Permalink
Use rpeferences
Browse files Browse the repository at this point in the history
  • Loading branch information
joshjordan committed May 19, 2020
1 parent f75495c commit 1bc7222
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/RNCWebView.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ - (void)didMoveToWindow
WKWebViewConfiguration *wkWebViewConfig = [WKWebViewConfiguration new];
WKPreferences *prefs = [[WKPreferences alloc]init];
[prefs setValue:@TRUE forKey:@"allowFileAccessFromFileURLs"];
[wkWebViewConfig setValue:@TRUE forKey:@"allowUniversalAccessFromFileURLs"];
[wkWebViewConfig setValue:@"TRUE" forKey:@"allowUniversalAccessFromFileURLs"];
wkWebViewConfig.preferences = prefs;
if (!_javaScriptEnabled) {
prefs.javaScriptEnabled = NO;
wkWebViewConfig.preferences = prefs;
}
if (_incognito) {
wkWebViewConfig.websiteDataStore = [WKWebsiteDataStore nonPersistentDataStore];
Expand Down

0 comments on commit 1bc7222

Please sign in to comment.