I am trying to do something very simple. I want to display an image hosted on a remote server in my phonegap app. I have tried everything I can think of.
• I’ve tried simply writing an absolute file path to an image tag in the markup
• I’ve tried using javascript to write html into the markup to do the same after the device ready function is called
• I’ve tried using html canvas elements to do it.
All of these methods work if I reference an image in a local directory in my www folder but nothing works if I try to use a src such as “http://www.somewhere.com/image.jpg”
Does anyone know whether there is a setting in xcode ios simulator or a something in phonegap that is preventing this???
I figured this out: Go to the PhoneGap.plist file in the supporting files directory, and add an ExternalHosts node for a wildcard domain, e.g. google to use the static GoogleMaps API.