Version and build numbers for Cordova and Phonegap mobile apps

I like to use the following simple versioning method for mobile apps:

<major>.<minor>

where <major> is incremented for every release that has new functionality or features and <minor> is incremented for a release with small enhancements or bug fixes.

I also prefer to separate the version number from the build number. I use the version number for the app itself and the build number for every time I upload a new build. This way I can upload multiple builds of the same version, if needed, without having to increment the version of the app since it has not changed.

To separate the version number from the build number in cordova/phonegap apps, use the following attributes in the config.xml file:

<widget id="your.app.id" version="0.15" android-versionCode="50" ios-CFBundleVersion="60" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

This app will have the version 0.15 with the build number 50 for Android and 60 for iOS.

Follow me for updates on similar new posts I write or tweet about this post.