I am experimenting the PhoneGap development for IPhone. The environment is XCode 4.1, PhoneGap 1.0. I am using the Weinre remote debugger according to the tutorial provided by PhoneGap, when I run the app in IPhone Simulator, I got this error shown in XCode output:
2011-08-31 09:31:15.275 Contacts[898:11803] ERROR whitelist rejection: url='http://localhost:8080/target/target-script-min.js#anonymous'
The URL is pointing to the Weinre server and it works in browser. I can't find anything about the "whitelist rejection" error in google. Any idea what does this mean?
Thanks!
whitelist support was recently added to phonegap. see here and here.
to fix this, you just need to add the needed domains in your PhoneGap.plist
to your ExternalHosts
-Array.
In your case, it would be localhost
and would look like this:
just code, because can't post an image:
<key>ExternalHosts</key>
<array>
<string>localhost</string>
<string>debug.phonegap.com</string>
</array>
Now that Apache Foundation has taken over the name has changed from PhoneGap.plist to Cordova.plist, but it's still ExternalHosts, this helped me get Weinre running which makes a huge difference when debugging directly on an iDevice.
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