Cordova 插件白名单请求 Cordova ios 4 失败 [英] Cordova Plugin Whitelist Failed asking for cordova ios 4

查看:43
本文介绍了Cordova 插件白名单请求 Cordova ios 4 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着跑

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

推荐答案

问题是今天发布了插件的 1.1.0 版本有这个要求,但是cordova-ios 4 还没有发布(还在开发中)).因此,如果您想在稳定版本 4 发布时继续使用cordova-ios 3.8,则必须安装该插件的先前版本(1.0.0).

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 cordova-plugin-whitelist@1.0.0

我不确定您是否可以使用 Ionic 运行此命令.也许您必须使用指定的版本编辑 ios.json?

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

如果做不到,可能要等到cordova-ios 4发布了

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

我创建了一个问题 https://issues.apache.org/jira/browse/CB-9232

来自创建的问题:

"如果你安装了cordova-ios 3.8.0,它不会为ios平台安装插件(但如果其他人满足引擎要求,则会为其他人安装.该插件仅适用于cordova-ios4.0.0 有不同的基于 CSP 的白名单机制.cordova-ios 3.8.0 仍然使用旧标签."

"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."

所以,暂时(cordova-ios 4新版工具发布后,可以忽略这个错误)

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

这篇关于Cordova 插件白名单请求 Cordova ios 4 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆