Meteor.js Cordova Error: ERROR whitelist rejection

2019-04-29 16:06发布

When running a Meteor.js Cordova iOS app on the iPhone, some of the images in the app do not load and the XCode console shows the error

ERROR whitelist rejection: url='https://d2xngy2dw7hums.cloudfront.net.....

How can we add some/all domains to the whitelist?

2条回答
Melony?
2楼-- · 2019-04-29 16:48

From XCode, open the Resources folder and you'll find yourapp-Info.plist. Open the plist file then under the App Transport Security Settings dictionary, add a new boolean key, 'Allow Arbitrary Loads' (this should auto-fill as you type) and set value to 'YES'. Alternatively,still within the App Transport Security dictionary, there's another dictionary called Exception domains, they have localhost listed there, you can use that as a template to add other domains.

查看更多
我想做一个坏孩纸
3楼-- · 2019-04-29 16:50
App.accessRule('*');  // add this to your mobile-config.js

You will need to kill and rebuild your meteor project

meteor run ios-device 

See related question for more details: In meteor app how to add orgin=* in cordova config.xml?

查看更多
登录 后发表回答