Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 1.13 KB

File metadata and controls

51 lines (30 loc) · 1.13 KB

Cordova AppVersion plugin

Reads the version of your app from the target build settings.

Installation

With cordova-cli

If you are using cordova-cli, install with:

cordova plugin add https://github.com/xuandac/plugin-app-info

With plugman

With a plain plugman, you should be able to install with something like:

plugman --platform <ios|android> --project <directory> --plugin https://github.com/xuandac/plugin-app-info

Manually in iOS

TODO: Write these instructions

Manually in Android

TODO: Write these instructions

Use from Javascript

If you are using jQuery, use:

cordova.getAppName().then(function (version) {
    $('.version').text(version);
});

If not:

cordova.getAppName(function (version) {
    alert(version);
});

## Credits

Written by Robert (Jamie) Munro at White October

Code based on the following Stack Overflow posts: