XMLHttpRequest not working in WKWebView due to CORS restriction but server sends Allow access origin response header

Project Settings:

1. XMLHttpRequest works fine in Cordova android and even in Cordova ios on the simulator with new WKWebView with the use of plugin cordova-plugin-file-xhr

2. The server sends Allow Access Origin response header so that is not an issue.



How can we overcome/bypass this for iOS devices?

Also, these requests work if I use https://github.com/TheMattRay/cordova-plugin-wkwebviewxhrfix plugin. Is this valid according to Apple security guidelines for App store checks for publishing the app?

XMLHttpRequest not working in WKWebView due to CORS restriction but server sends Allow access origin response header
 
 
Q