Show the version name

Hi at all,
I’d like to know how to show the version written in the config.xml (e.g. 0.0.2) in my app.
Tnx

Pro Tip: Google is your friend for these kind of things. Google “phonegap get version number” and you’ll find stuff like this:

1 Like

Hi @devilmark84,

You can do this using the plugin by white october:

cordova plugin add https://github.com/whiteoctober/cordova-plugin-app-version.git

With the plugin installed you can use the following code:

cordova.getAppVersion(function(version) {
    appVersion = version;
});

I wrote a tutorial you can find on this here:

Regards,

1 Like