Tôi cố gắng để:Không thể thêm iOS nền tảng mà trên Cordova
cordova platform add ios
Tuy nhiên tôi luôn nhận được lỗi sau:
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
Đây là package.json
{
"name": "App",
"version": "1.0.0",
"description": "App",
"dependencies": {
"gulp": "^3.5.6",
"gulp-coffee": "^2.1.1",
"gulp-sass": "2.0.0",
"gulp-slim": "",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-watch": "^0.6.8"
},
"devDependencies": {
"bower": "^1.3.3",
"fs": "0.0.2",
"gulp-changed": "^1.1.1",
"gulp-clean": "^0.3.1",
"gulp-replace-task": "^0.1.0",
"gulp-util": "~3.0.0",
"shelljs": "^0.3.0",
"yargs": "^1.3.3"
},
"cordovaPlugins": [
"https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git",
"https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git",
"https://github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin.git",
"https://github.com/apache/cordova-plugin-globalization.git",
"org.apache.cordova.inappbrowser",
"org.apache.cordova.console",
"org.apache.cordova.device",
"org.apache.cordova.statusbar",
"org.apache.cordova.splashscreen",
"org.apache.cordova.geolocation",
"org.apache.cordova.camera",
"org.apache.cordova.file-transfer",
"com.ionic.keyboard",
"./engine/cordova-crosswalk-engine-c0.6.2",
{
"locator": "engine/cordova-crosswalk-engine-c0.7.1",
"id": "cordova-plugin-crosswalk-webview"
},
"https://github.com/apache/cordova-plugin-whitelist.git"
],
"cordovaPlatforms": [
{
"platform": "android",
"locator": "./engine/cordova-android-c0.6.1/"
}
]
}
Bất kỳ ý tưởng của tôi những gì tôi có thể làm sai?
Phiên bản cordova của bạn là gì? –
5.0.0 nói 'thông tin cordova' – Hendrik
Điều đó thật kỳ lạ. Ngay cả khi đây là những gì tập tin cấu hình nói có: https://github.com/apache/cordova-plugin-whitelist/blob/master/package.json và ở đó: https://github.com/apache/cordova-plugin- danh sách trắng/blob/master/plugin.xml, điều này thực sự không được tính đến vì phiên bản hiện tại cuối cùng cho iOS là 3.8 (https://github.com/apache/cordova-ios/releases). Tôi có các phiên bản lưu và tôi có thể thêm cả hai nền tảng. Nhưng điều tôi không hiểu là tại sao bạn đặt 'cordovaPlugins' và' cordovaPlatforms' bên trong một composer.json. Đây không phải là cách nó được thực hiện. –