maridob
maridob

Reputation: 661

Update phonegap cordova version

I am trying to update the latest cordova version to my project. I did run the below command:

  $ sudo npm update -g cordova

after running this command, I checked and using cordova info command I can see that I have the latest version of cordova

Node version: v0.12.2

Cordova version: 5.3.1

Config.xml file: 

However, when I go to the platform folder and ran

cordova platform version ios

The results is showing that I am still in the older version.

Installed platforms: ios 3.9.1
Available platforms: amazon-fireos, android, blackberry10, browser, firefoxos, osx, webos

I tried using the cordova platform update but I am getting an error, see below. Am I missing anything?

cordova platform update [email protected]
Failed to fetch platform [email protected]
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: version not found: [email protected]

Upvotes: 1

Views: 2215

Answers (1)

Uncharted Space
Uncharted Space

Reputation: 861

The various parts or cordova (cli, platforms, plugins) all move and release independently, which means they all can and will have different version numbers. For example the current release of the cordova-ios platform is 3.9.1 and the current release of android is 4.1.1. You can see what platforms are available by running

cordova platform list

You can see all published versions for a given platform via npm

npm view cordova-{platform} versions

replacing {platform} with anything given by the list command above.

Hope this helps!

Upvotes: 2

Related Questions