Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR whitelist rejection on iOS using Cordova 5

Tags:

ios

cordova

I've been using cordova for almost 3 years, and used to add the following line in config.xml to whitelist all resources.

<access origin="*" />

Today, I upgraded to cordova 5, and I've been getting a lot of the following error

ERROR whitelist rejection: url='example.com'

I installed cordova-plugin-whitelist, and updated my config.xml with the following 3 lines

<access origin="*" />
<allow-intent href="*" />
<allow-navigation href="*" />

And added the following meta tag to my index.html twice, once with gap and another without it

<meta http-equiv="Content-Security-Policy" content="default-src * data: gap:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

and nothing happened! still getting the "ERROR whitelist rejection" in Xcode console!

like image 223
Mahmoud M. Abdel-Fattah Avatar asked Aug 12 '15 21:08

Mahmoud M. Abdel-Fattah


1 Answers

As usual, I removed all platforms and plugins, re-added them again and everything worked fine!

like image 168
Mahmoud M. Abdel-Fattah Avatar answered Nov 12 '22 12:11

Mahmoud M. Abdel-Fattah