Skip to content

Commit

Permalink
feat(): add app version plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Feb 17, 2016
1 parent 44d6d5c commit 8b78521
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions src/plugins/appversion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import {Plugin, Cordova} from './plugin';

/**
* Reads the version of your app from the target build settings.
*
* Requires Cordova plugin: cordova-plugin-appversion. For more info, please see the [cordova-plugin-version docs](ttps://github.com/whiteoctober/cordova-plugin-app-version).
*
* ```
* ionic plugin add https://github.com/whiteoctober/cordova-plugin-app-version.git
* ````
*
* @usage
* ```js
* AppVersion.getAppName();
* AppVersion.getPackageName();
* AppVersion.getVersionCode();
* AppVersion.getVersionNumber();
* ```
*/
@Plugin({
name: 'AppRate',
plugin: 'cordova-plugin-appversion',
pluginRef: 'cordova.getAppVersion'
})
export class AppVersion {

/**
* Returns the name of the app
*/
@Cordova
static getAppName () : string {
return;
}

/**
* Returns the package name of the app
*/
@Cordova
static getPackageName () : string {
return;
}

/**
* Returns the build identifier of the app
*/
@Cordova
static getVersionCode () : string {
return;
}

/**
* Returns the version of the app
*/
@Cordova
static getVersionNumber () : string {
return;
}

}

0 comments on commit 8b78521

Please sign in to comment.