Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
786 views
in Technique[技术] by (71.8m points)

android - Cordova Plugin Whitelist Failed asking for cordova ios 4

I tried to run

ionic platform ios android

and it gives me this error today (it works fine before)

Installing "cordova-plugin-whitelist" for ios
Failed to install 'cordova-plugin-whitelist':CordovaError: Plugin doesn't support this project's cordova-ios version. cordova-ios: 3.8.0, failed version requirement: >=4.0.0-dev
    at checkEngines (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:116:29)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:289:16
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:355:11)
Plugin doesn't support this project's cordova-ios version. cordova-ios: 3.8.0, failed version requirement: >=4.0.0-dev
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The problem is that the 1.1.0 version of the plugin was released today with that requirement, but cordova-ios 4 is not released yet (is still in development). So if you wanna keep using cordova-ios 3.8 while the stable version 4 is released, you have to install the previous version of the plugin (1.0.0).

cordova plugin add [email protected]

I'm not sure if you can run this command using Ionic. Maybe you have to edit the ios.json with the version specified?

If you can't do this, maybe you have to wait until cordova-ios 4 is released

I created an issue https://issues.apache.org/jira/browse/CB-9232

Edit:

From the issue created:

"If you have cordova-ios 3.8.0 installed, it won't install the plugin for the ios platform (but will do so for the others if they fulfill the engine requirement). The plugin only works for cordova-ios 4.0.0 which has a different whitelist mechanism based on CSP. cordova-ios 3.8.0 still uses the old tag."

So, for now (while the new version of the tools of cordova-ios 4 is released, you can ignore this error)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...