Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not add iOS Platform on Cordova

I am trying to:

cordova platform add ios

However I always receive the following error:

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

This is my 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/"
    }
  ]
}

Any ideas what I could be doing wrong?

like image 345
Hendrik Avatar asked Jun 07 '15 17:06

Hendrik


2 Answers

try this, first upgrade all your npm packages (this could take a while)

npm update -g

Then try to install the platform

cordova platform add ios

if you still have the problem try removing the platform first (maybe you have already installed it)

cordova platform rm ios

and then add it again

cordova platform add ios

you can also try this:

cordova platform update ios

(from here https://cordova.apache.org/docs/en/5.0.0/guide_platforms_ios_upgrade.md.html#Upgrading%20iOS)

Hope this helps

like image 166
wezzy Avatar answered Oct 03 '22 19:10

wezzy


Simply use a version of whitelist plugin that is compatible with IOS platform 3.8.0, until the 4.0.0 is officially released.

<plugin name="cordova-plugin-whitelist" spec="1.0.0" />
like image 36
Sebastien Lorber Avatar answered Oct 03 '22 19:10

Sebastien Lorber