weinre with iPhone simulator

会有一股神秘感。 提交于 2019-12-09 16:13:20

问题


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!


回答1:


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 localhostand 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>



回答2:


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.



来源:https://stackoverflow.com/questions/7260337/weinre-with-iphone-simulator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!