weinre与iPhone模拟器 [英] weinre with iPhone simulator
问题描述
我正在试验iPhone的PhoneGap开发。环境是XCode 4.1,PhoneGap 1.0。我使用Weinre远程调试器根据PhoneGap提供的教程,当我在iPhone模拟器中运行应用程序,我得到这个错误显示在XCode输出:
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'
URL指向Weinre服务器,它在浏览器中工作。我在Google找不到任何关于白名单拒绝错误的消息。任何想法这是什么意思?
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?
感谢!
推荐答案
白名单支持最近已添加到phonegap。
请参阅此处和这里。
whitelist support was recently added to phonegap. see here and here.
要修复这个问题,你只需要在 PhoneGap.plist
到您的 ExternalHosts
-Array。
to fix this, you just need to add the needed domains in your PhoneGap.plist
to your ExternalHosts
-Array.
localhost
,其外观如下:
只是代码,因为无法发布图片:
just code, because can't post an image:
<key>ExternalHosts</key>
<array>
<string>localhost</string>
<string>debug.phonegap.com</string>
</array>
这篇关于weinre与iPhone模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!