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];