I just updated from Cordova 8 to Cordova 10. Mainly because of Apple deprecating UIWebView. I use cordova-ios@6.1.1. I create a default Cordova project for test purposes. I add no plugins, no other stuff except jQuery version 3.5.1. I add AJAX request to internal application file css/index.css ( this works fine in Cordova 8 ):
function onDeviceReady() {
// Cordova is now initialized. Have fun!
console.log('Running cordova-' + cordova.platformId + '@' + cordova.version);
document.getElementById('deviceready').classList.add('ready');
$.ajax({
url: "css/index.css",
success: function (resp) {
console.log("load OK");
return false;
},
error: function (xhr, status, exc) {
console.log("load fail");
return false;
}
});
}
When I run the application, the AJAX call fails with status = "error". Please, could anybody advice what was changed and how to make such an AJAX calls working?