Git Product home page Git Product logo

cordova-plugin-app-version's Introduction

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 or AngularJS, promise style is supported. Use something like:

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

If not, pass a callback function:

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

In addition to the version number you can also retrieve other details about your application:

getAppName

Returns the name of the app. E.g. "My Awesome App"

getPackageName

Returns the package name of the app - the reversed domain name app identifier like com.example.myawesomeapp

getVersionCode

Returns the build identifier of the app

getVersionNumber

Returns the version number of the app

## Credits

Written by Robert (Jamie) Munro at White October

Various others have contributed fixes and new features. See the CHANGELOG.md for details.

Original code based on the following Stack Overflow posts:

cordova-plugin-app-version's People

Contributors

axoinsanit avatar cristi-badila avatar deliriousrhino avatar eddyverbruggen avatar freakboy3742 avatar gprasanth avatar humancopy avatar matiassingers avatar oliversalzburg avatar richsage avatar rjmunro avatar trylika avatar uranus86 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.