Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

whitelist not working ionic with crosswalk

I created a working app using ionic. there was no problem with fetching data from my site and everything was good.

I then went to add crosswalk to it and now i get the error when i run it on my android phone:

W/XWalkCordovaResourceClient():URL blocked by whitelist: http://example.com/api/

In the top level config.xml i have tried each of the following (not all 3 at once) and reran it (ionic run android) with the same results:

  <access origin="*"/>
  <access origin="http://www.example.com/*"/>
  <access origin="http://www.example.com"/>

What am I doing wrong?

running 'ionic info' i get:

OS: Max OS Yosemite
Nodoe Version: v0.10.36
Cordova CLI: 4.3.0
Ionic CLI Version: 1.3.19
Xcode version: Xcode 6.2 Build Version 6C121e
ios-sim version: 3.1.1.

As a separate but possible related question, after installing crosswalk running the app on an android emulator has stopped working also - after building successfully it just says 'the app has stopped'

like image 812
user1139675 Avatar asked Apr 03 '15 17:04

user1139675


1 Answers

I figured it out! The problem is that in the latest Cordova, they've split out the whitelist functionality into its own plugin.

Simply run ionic plugin add https://github.com/apache/cordova-plugin-whitelist.git and you're good!

like image 99
TheBosZ Avatar answered Oct 08 '22 20:10

TheBosZ