Access Localhost on MAC from Xcode? Phonegap Communicating with Ajax to a Local Rails App

How to access localhost from device

If you are on the same wifi network, you could use your computer ip address. Otherwise, if you want to be able to access your node app from every wifi network, you could use Ngrok.

It will expose your address on a public URL

Remote Access a PhoneGap App

You were probably on the right track with the web server idea.

I am not sure how well the various solutions are supported in PhoneGap, but I would think you could use some sort of WebSockets implementation for the bi-directional communication between the iPhone and iPad apps.

Sencha ExtJs Ajax Store not loading in XCode

According to this answer, in XCode an Ajax call to load a local file will fail, so I guess this cannot work.

jsonp callback not firing from iPhone simulator with PhoneGap

Have you added your server to whitelist?

http://docs.phonegap.com/en/1.9.0/guide_whitelist_index.md.html

iOS

Details

Open Cordova.plist. In Xcode, it is found at AppName/Supporting
Files/Cordova.plist In the directory, it is found at
AppName/Cordova.plist Add a new String value under the ExternalHosts
key. We recommend using Xcode to avoid editing raw XML. Domain
protocols (e.g. http:// and https://) are not supported by iOS.

Detect if running inside PhoneGap/ Cordova

In local file and mobile website deviceready won't fire as it is a PhoneGap specific event. so u can set your IsRunningOnPhoneGap flag in the device ready event.



Related Topics



Leave a reply



Submit