I have an app that works fine on emulator or whenever I test it locally, but whenever I send to review, it’s refused because the reviewer can’t connect to the app.
The app sends ajax requests via HTTP.
The plugins I’m using are:
cordova-plugin-device
cordova-plugin-console
cordova-plugin-whitelist
cordova-plugin-network-information
cordova-sqlite-storage
Not sure if I got the question right. But the server which the ajax request is sent is HTTP.
I’ve had the same problem on another app, requests on HTTP as well, and it works just fine. So I’m not sure that’s the problem.
Oh, thank you!
Its HTTP. But I have just sent an app with http and it was approved.
To give some more info:
I’m having 3 errors:
Origin null is not allowed by Access-Control-Allow-Origin
XMLHtpRequest cannot load http://… due to access control checks
Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin.
Origin null is not allowed by Access-Control-Allow-Origin
XMLHtpRequest cannot load http://… due to access control checks
Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin.
This is CORS, which we have a full page dedicated to on our docs.
Thank you for your answer!
I have tried adding header(“Access-Control-Allow-Origin: *”); to the PHP file that receive the ajax requests, and still got no luck.
Tried adding cordova-plugin-cors as well.
The strange part is that it works completely fine on my end, but the reviewer can’t connect.
Any other thing I could look up into?