Showing posts with label whitelist rejection in phonegap. Show all posts
Showing posts with label whitelist rejection in phonegap. Show all posts

Wednesday, November 16, 2011

Phonegap | Whitelist rejection in phonegap compilation with Xcode

While having an other domain server based service. Our phonegap application failed with ERROR logs :
whitelist rejection in phonegap compilation
The solution is to Whitelist (allow) the host to be accessible via phonegap, to accomplish it
In Phonegap.plist file,
Add new row to External Host (Key value pair)
for value, put your host name : (SERVER.COM).
e.g.
1) ERROR whitelist rejection: url('http://localhost:XXXX/myproject/index')
Type: localhost in value column for for External Host
2) ERROR whitelist rejection: url('http://myserver.com/dashboard/mobilews.php?')
Type: myserver in value column for External Host


May be putting "*" , the asterisk as a value of the host that references an external URL , will do the trick. but not safe.
hope this helps, It works great for us :)

see my comments below for more info, as phonegap is cordova now!