我正在尝试iPhone的PhoneGap开发.环境是XCode 4.1,PhoneGap 1.0.根据PhoneGap提供的教程,我正在使用Weinre远程调试器,当我在IPhone Simulator中运行应用程序时,我收到了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服务器,它在浏览器中工作. Google找不到有关“白名单拒绝”错误的信息.任何想法这是什么意思?
谢谢!
解决方法
白名单支持最近被添加到手机空间.
见 here和 here.
见 here和 here.
要解决这个问题,您只需要将PhoneGap.plist中所需的域添加到ExternalHosts-Array.
在你的情况下,这将是localhostand将看起来像这样:
只是代码,因为不能发布图像:
<key>ExternalHosts</key> <array> <string>localhost</string> <string>debug.phonegap.com</string> </array>