Over a million developers have joined DZone.
Platinum Partner

How do you check (and update) your PhoneGap version in 3.0?

· Mobile Zone

The Mobile Zone is brought to you in partnership with CA Technologies.  Spending too much time coding your mobile backend? CA Mobile App Services does the work for you.

A tip of the rage wolf to fellow Adobian Brian Leroux for his help with this blog post. And by help, I mean he basically explained it all to me and I'm just making it pretty.

One of the big changes to PhoneGap 3.0 is how you install it. Previously, you would download a zip file, expand it, and have all the bits you need. Now the installation process has you use NPM (Node Package Manager) to grab the bits.

I've been using Node and NPM for a while, but I'm definitely still a bit unsure of how it works. The question I had was, how would I be able to tell when a new version was released and how would I get my copy updated?

First, remember that the PhoneGap CLI has a -v argument that tells you the current version you have installed:

Currently, the PhoneGap site only mentions 3.0 and not anything more specific, so to compare your version to the latest in NPM you would do "npm info phonegap version". This is demonstrated below:

In this case, my version is the same, but if I wanted to update it, I'd run: npm update -g phonegap. I always use sudo in front but you may not have to do that (especially on Windows ;) ).

I hope this helps. Tomorrow morning I'll be blogging about how plugins have changed.

The Mobile Zone is brought to you in partnership with CA Technologies. Read the ebook: Accelerating Enterprise Mobile and IoT App Development to learn more.


Published at DZone with permission of Raymond Camden , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}