使用phonegap在运行时在iphone的cordova.plist文件中将url添加到白名单 [英] add url to the whitelist in cordova.plist file in iphone at runtime with phonegap
问题描述
我正在移动应用网站 http://www.turrg.com 在phonegap全部与android工作正常,但在iphone的情况下,我必须将url域名添加到cordova.plist文件中的白名单。但是网站数据来自不同的2个站点,所以我必须将这些网站的域名添加到cordova.plist文件中的白名单中是否有任何解决方案我动态地将这些域名广告在新域名时自动添加添加到turrg网站..
在cordova.plist文件中添加了这样的域名。
i am making an mobile application of the site http://www.turrg.com in phonegap its all working fine with android but in case of iphone i have to add url domain name to the whitelist in cordova.plist file. but in site data is coming from different-2 sites so i have to add the domain name of these sites to the whitelist in cordova.plist file is there any solution that i ads these domain name at dynamically means add automatically when new domain names are added to the turrg site.. added domain name in cordova.plist file like this.
<key>ExternalHosts</key>
<array>
<string>*.facebook.com</string>
</array>
当网站有新域名时,如何在该文件中自动添加此类域名。
请帮助我
提前致谢。
how can i add this type of domain name in that file automatically when site has new domain name. please help me Thanks in advance.
推荐答案
使用通配符,它将允许所有网址:
Use wildcard which will allow all the url:
<key>ExternalHosts</key>
<array>
<string>*</string>
</array>
这篇关于使用phonegap在运行时在iphone的cordova.plist文件中将url添加到白名单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!