且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iPhone上的PhoneGap不会加载外部脚本

更新时间:2023-12-04 22:16:22

您是否已将外部链接的域添加到ExternalHosts在PhoneGap.plist中输入?

Have you added the domains of the external links to the ExternalHosts entry in PhoneGap.plist ?

PhoneGap中有一个相当新的白名单系统导致与外部链接有点混淆

There is a fairly new whitelisting system in PhoneGap that is causing a bit of confusion with external links

来自 - http://wiki.phonegap.com/

此外,最新代码具有新的白名单功能。如果您引用外部主机,则必须在ExternalHosts键下的PhoneGap.plist中添加主机。通配符是好的。所以如果你要连接到 http://phonegap.com ,你必须添加phonegap.com到列表(或使用通配符* .phonegap.com,它也将匹配子域名。)

"Also, the latest code has the new white-list feature. If you are referencing external hosts, you will have to add the host in PhoneGap.plist under the "ExternalHosts" key. Wildcards are ok. So if you are connecting to "http://phonegap.com", you have to add "phonegap.com" to the list (or use the wildcard "*.phonegap.com" which will match subdomains as well)."