Tom
Tom

Reputation: 2230

jsonp callback not firing from iPhone simulator with PhoneGap

I have an HTML5/JS app backed by ASP.NET WebAPI. The WebAPI is running on my windows PC IIS for now and the client app is running on a separate mac device on the same network.

When I run the application via Safari on the Mac, this works fine (callbacks okay, etc...) - same goes for browsers on my Windows PC.

After I build the PhoneGap app and load in XCode then try to run the simulator, I get errors (jQuery###### never called), the typical callback is never called error.

Upvotes: 0

Views: 252

Answers (1)

Flatlineato
Flatlineato

Reputation: 1066

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.

Upvotes: 1

Related Questions