iOS - WKWebView Cross origin requests are only supported for HTTP
For Xamarin.iOS devs:
WKWebViewConfiguration config = webView.Configuration;
config.Preferences.SetValueForKey( FromObject( true ), new NSString( "allowFileAccessFromFileURLs" ) );
config.SetValueForKey( FromObject( true ), new NSString( "allowUniversalAccessFromFileURLs" ) );
File Access and universal File access (In case of reading media from device)
[webView.configuration.preferences setValue:@YES forKey:@"allowFileAccessFromFileURLs"];
[webView.configuration setValue:@YES forKey:@"allowUniversalAccessFromFileURLs"];
To resolve it, you need to turn allowFileAccessFromFileURLs
on from WKPreferences
Swift
webView.configuration.preferences.setValue(true, forKey: "allowFileAccessFromFileURLs")
Objective-C
[webView.configuration.preferences setValue:@YES forKey:@"allowFileAccessFromFileURLs"];