I am currently writing a simple application using PhoneGap (iOS) and running it in the simulator. The problem is that external URLs seem to refuse to load. For example using a CDN for jQuery
<script type="text/javascript" charset="utf-8" src="http://code.jquery.com/jquery-1.7.min.js"></script>
Will not make $
/jQuery
available. The same problem is happening for weinre when trying to use it. Is there something I need to change to enable this to work?
Have you added the domains of the external links to the ExternalHosts entry in PhoneGap.plist ?
There is a fairly new whitelisting system in PhoneGap that is causing a bit of confusion with external links
From - http://wiki.phonegap.com/ :
"Also, the latest code has the new white-list feature. If you are referencing external hosts, you will have to add the host in PhoneGap.plist under the "ExternalHosts" key. Wildcards are ok. So if you are connecting to "http://phonegap.com", you have to add "phonegap.com" to the list (or use the wildcard "*.phonegap.com" which will match subdomains as well)."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With