NexusLee / cordova-plugin-app-version

Cordova plugin to return the version number of the current app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/whiteoctober/cordova-plugin-app-version.git

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/whiteoctober/cordova-plugin-app-version.git

Manually in iOS

TODO: Write these instructions

Manually in Android

TODO: Write these instructions

Use from Javascript

If you are using jQuery, use:

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

If not:

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

## Credits

Written by Robert (Jamie) Munro at White October

Code based on the following Stack Overflow posts:

About

Cordova plugin to return the version number of the current app

License:MIT License


Languages

Language:JavaScript 37.7%Language:Objective-C 23.9%Language:Java 19.3%Language:C# 19.1%