1

I developed a test mobile app with PhoneJS, which access a node server ( localhost:3000) w MongoDB local DB... Everything is working fine when testing in web browser or using Ripple simulator.

Then I deployed this test app using PhoneGap/Cordova ( 3.0.0 ) and installed it on my iPhone device. Starting the app, the data are not loaded ( got the Loading icon... and nothing happen) As my node server doesn't display anything in the console, I guess there is an issue in the .get Ajax call

is there any specific parameter to be added to the PhoneGap config.xml ? ( I have already : github.com/erwin/DataBound.Mobile.git included ..

1 Answers1

2

Localhost is "this computer" so when you try to access localhost from your phone you don't get an answer because you don't have a server in your phone.

You have to use the local IP of the computer with the server instead using localhost if the server and the phone are on the same network

jcesarmobile
  • 51,328
  • 11
  • 132
  • 176
  • I am using the local IP and it does not work any ideas? – mc9 Oct 27 '15 at 06:51
  • Open a new question and give more details (cordova version, platform version, device OS, etc) It's probably the whitelist plugin, the CSP or if you are testing on iOS, the ATS, you can try to search those before opening your question – jcesarmobile Oct 27 '15 at 08:03
  • @jcesarmobile I have opened another question at http://stackoverflow.com/questions/33360913/android-device-communicate-with-local-api-server. I am not using any whitelist plugin at the moment. – mc9 Oct 27 '15 at 22:46
  • I saw it and wrote on the chat you opened – jcesarmobile Oct 28 '15 at 07:54