Cordova iOS error: Origin null is not allowed by Access-Control-Allow-Origin

Try this solution:

Search the code for the following line: (might be in several files, so do it for all of them) WKWebViewConfiguration* configuration = [[WKWebViewConfiguration alloc] init];

And add the following two lines after it:

[configuration.preferences setValue:@TRUE forKey:@"allowFileAccessFromFileURLs"];
[configuration setValue:@"TRUE" forKey:@"allowUniversalAccessFromFileURLs"];