I am unable to get my AJAX requests working on an Ionic + Cordova app deployed to iOS and Android. I get the following rejection:
{"data":null,"status":-1,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"auth":true,"url":"http://myapp/api/users/me","headers":{"Accept":"application/json, text/plain, */*","Authorization":"Bearer 00D17000000BUvD!ARcAQKWePqxMuG2PAGxSfgas48nWGAkP7THZir6j5nzgodOR.xGZyXzVh9z5CvxaYe6hO.aKwH.gqvZCGL6a2QW74lBIrEtR"}},"statusText":""}
This request works as expected on the web app and in Postman.
I have added the following to my root config.xml file, ran "ionic prepare" and verified they are in the platforms/ios/MyApp/config.xml. (Note: Where should I check for Android?):
I have installed "cordova-plugin-whitelist" and it is in both plugins/android.json and plugins/ios.json, but I'm not sure where I can verify these are included as expected.
AJAX requests worked until I installed cordova-plugin-wkwebview-engine and ran ionic prepare - I think this wiped out some misplaced XML config that made it work. Also, I do see in my logs that the request appears to have hit my API. Perhaps there is a different issue here?