How do you test a hybrid application when your requirement is to sign off and ship the very same package? You have a single hardcoded URL your AJAX calls are going to go to, but actually this endpoint needs to be different in test and production environments.
Is there a way to have but hide an application configuration option, setting from the end user?
Testing is performed on iOS tablet running a native app package.
If you really really want to ship the exact same code all the time, you could easily use local storage. In your app:
if(!localStorage.getItem('env')) localStorage.setItem('env', 'production');
switch(localStorage.getItem('env') {
case 'testing': endpoint = 'http://testserver'; break;
case 'production': endpoint = 'http://productionserver'; break;
}
Then just open your browser console and type:
localStorage.setItem('env', 'testing');
You might not be able to open a console on mobile browsers or inside Cordova, but if you really need that: rethink the "same package" thing. I can't think of any valid reason why you would not want to do different testing and production builds.