Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rareloop/cordova-plugin-app-version
Access the native app version in JavaScript
https://github.com/rareloop/cordova-plugin-app-version
Last synced: 5 days ago
JSON representation
Access the native app version in JavaScript
- Host: GitHub
- URL: https://github.com/rareloop/cordova-plugin-app-version
- Owner: Rareloop
- License: mit
- Created: 2015-04-24T15:00:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-31T17:46:51.000Z (over 4 years ago)
- Last Synced: 2024-10-29T07:08:59.270Z (15 days ago)
- Language: Objective-C
- Size: 139 KB
- Stars: 22
- Watchers: 3
- Forks: 40
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cordova App Version Plugin
Cordova/PhoneGap plugin for accessing the native app's version and build number within JavaScript. The values are bootstrapped at app load and can be used synchronously.
## Supported Platforms
- iOS
- Android## Installation
The plugin can be installed with the Cordova CLI:
```shell
cordova plugin add cordova-plugin-appversion
```The plugin is hosted on NPM so requires Cordova CLI `5.0.0` as a minimum. If you have any issues installing, make sure you have the most upto date version of Cordova from NPM:
```shell
npm install -g cordova
```## Usage
After `deviceReady` has fired you'll be able to access a new object in the global scope that contains both the app version and build number.
```javascript
console.log(AppVersion.version); // e.g. "1.2.3"
console.log(AppVersion.build); // e.g. 1234
```