So I noticed uiwebview was upgraded to WKWebview which is great, it’s much faster with the nitro JavaScript engine in iOS, although I have a problem I want to run a web page from the documents directory and it doesn’t seem to work, on investigation into the source code I see that when initializing the web view there is no configuration set to allow this, to make this work how can I get this added to the core source.
below is the code needed to be added to Rtt_IPhoneWebViewObject.mm at approx line 133
WKWebViewConfiguration \*theConfiguration = [[WKWebViewConfiguration alloc] init]; [theConfiguration.preferences setValue:@YES forKey:@"allowFileAccessFromFileURLs"]; // needed to run web page from documents directory [theConfiguration.preferences setValue:@YES forKey:@"OfflineApplicationCacheIsEnabled"]; // needed to run web page from documents directory // alternative initialization for web view fWebView = [[WKWebView alloc] initWithFrame:webViewRect configuration:theConfiguration];