I am trying to get data from an external url but it won’t work on iPhone emulator or device. I have the whitelist plugin installed and I have tried a number of different Content-Security-Policy tag combinations I found on the forum. none of them work, Android ajax works without a Content-Security-Policy tag at all. I’ve tried some combinations of access origin and allow-intent in my config with no effect except sometimes the android/browser ajax breaks.
I am building using Cordova
Example Snippet of usage
function getLogList(field, fieldVal, title){
app.request.get(‘https://evolveplay.wpengine.com/wp-json/jonesapp/v2/appdata’, function (data) {
var data = JSON.parse(data);
// Do stuff
});
}
$$(’.log-call-details’).on(‘click’, ‘.popup-log-call’, function (e) {
var field = $$(this).data(‘field’);
var fieldVal = $$(this).data(‘value’);
getLogList(field, fieldVal, ‘Select Site’);
});