weinre 与 iPhone 模拟器
我正在试验 iPhone 的 PhoneGap 开发。环境是XCode 4.1,PhoneGap 1.0。我根据 PhoneGap 提供的教程使用 Weinre 远程调试器,当我在 iPhone 模拟器中运行该应用程序时,我在 XCode 输出中收到此错误:
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 服务器并且它在浏览器中工作。我在谷歌中找不到任何有关“白名单拒绝”错误的信息。知道这是什么意思吗?
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
现在 Apache 基金会接管了名称,已从 PhoneGap.plist 更改为 Cordova.plist,但它仍然是ExternalHosts,这帮助我让 Weinre 运行,这产生了巨大的差异直接在 iDevice 上调试时。
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.
Phonegap 最近添加了白名单支持。
请参阅此处和此处。
要解决此问题,您只需将
PhoneGap.plist
中所需的域添加到ExternalHosts
-Array 中。在您的情况下,它将是
localhost
并且看起来像这样:只是代码,因为无法发布图像:
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 yourExternalHosts
-Array.In your case, it would be
localhost
and would look like this:just code, because can't post an image: