From 1bc722261131f24284d43d5beee5da7c75c2bf87 Mon Sep 17 00:00:00 2001 From: Josh Jordan Date: Tue, 19 May 2020 11:29:26 -0400 Subject: [PATCH] Use rpeferences --- ios/RNCWebView.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/RNCWebView.m b/ios/RNCWebView.m index a3aecb6..e6b305d 100644 --- a/ios/RNCWebView.m +++ b/ios/RNCWebView.m @@ -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];