We are building Cordova app which uses jQuery AJAX. It was working fine but suddenly stopped working on iOS. It works sometimes but not always.
$.ajax({
url : "https://example.com/result.php",
dataType : 'json',
success : function(data){
//
}
});
And the result I get is:
xhr.status : 0
I heard that Apple update from UIWebView to WKWebView, which was breaking the Ajax code. After that, I found this answer and tried but still its not working. As i said earlier, its not always working.
https://stackoverflow.com/a/61922415/3468603
As per the above answer, included these plugins
<plugin name="cordova-plugin-wkwebview-engine" />
<plugin name="cordova-plugin-wkwebview-file-xhr" spec="~2.1.4" />
<preference name="AllowUntrustedCerts" value="on" />
<preference name="InterceptRemoteRequests" value="all" />
<preference name="NativeXHRLogging" value="full" />
Can Anyone help?