0

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.

Manish Agrawal
  • 551
  • 2
  • 6
  • 22

1 Answers1

2

Use wildcard which will allow all the url:

<key>ExternalHosts</key>
<array>
     <string>*</string>
</array>
dhaval
  • 7,611
  • 3
  • 29
  • 38
  • you need to accept the answer by clicking on the green check on left – dhaval Jun 29 '12 at 08:08
  • What are the implications of doing that? – phi Nov 26 '12 at 16:32
  • @Irene `*` or `Allow All` is suitable in the situation where it is difficult to track all the domains being access from the app, however is not encouraged in the production environment. It is possible best approach when your app is using third party services which internally does series of redirection or serve resources from variety of domains. I do not see any major drawback of using this option when situation demands. – dhaval Nov 26 '12 at 17:00