How to display version number for a Meteor/Cordova app

I’ve been trying to work out the best way to manage versioning of a mobile cordova app.

  • And in particular how to manage and display the current version number somewhere in the app UI.

My first thought for displaying the version number was to use the Cordova version string offered by config.xml, which you can control by placing it in mobile-config.js in the app’s root folder.

App.info({
    id: 'com.mydomain.appname',
    name: 'whatever',
    description: 'great app',
    version: '0.1.5'
 });

This would be an obvious place to put the version, and it’s easily accessible from meteor.
The problem is: if you make any changes to Cordova, hot code push stops working.
And in my experience simply changing this version number counts as a change to Cordova and prevents hot code push.

So I suppose I need to put the version number in the meteor settings file and read it from there.

Apart from this - has anyone got any general tips about versioning a meteor/cordova app? I follow semver, which gives clear indications about numbering major and minor versions, but is there anything else I should be looking at?
Any help would be gratefully received.

1 Like