Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phonegap app ERROR whitelist rejection: url='http://xyz.com'

Below is my JSON code

$.getJSON("http://xyz.com",function(result){
    alert(result);
]});

I get this error whitelist rejection: url='http://xyz.com' ON IPHONE

like image 852
Patel Avatar asked Dec 03 '12 11:12

Patel


2 Answers

In cordova/phonegap all external URLs are blocked by default. To change this, you have to add the url in question to the whitelist exception in Cordova.plist (XCode).

whitelist exception for one URL

Alternatively, you could add a * wildcard to allow all domains as shown below.

whitelist exception for all external urls

like image 63
davidpfahler Avatar answered Oct 27 '22 01:10

davidpfahler


cordova.2.9/phonegap after have accept all external URLs are by default.

like image 38
Patel Avatar answered Oct 27 '22 00:10

Patel