awesome-cordova-plugins/src/plugins/appversion.ts
Guillermo 7952f9ef60 Improvements on documentation (#340)
* Improvements on documentation and some refactor

* ts | js -> typescript (docs)
2016-07-20 11:17:09 -04:00

57 lines
1.3 KiB
TypeScript

import { Cordova, Plugin } from './plugin';
/**
* @name App Version
* @description
* Reads the version of your app from the target build settings.
*
* Requires Cordova plugin: `cordova-plugin-app-version`. For more info, please see the [Cordova App Version docs](https://github.com/whiteoctober/cordova-plugin-app-version).
*
* @usage
* ```typescript
* import { AppVersion } from 'ionic-native';
*
*
* AppVersion.getAppName();
* AppVersion.getPackageName();
* AppVersion.getVersionCode();
* AppVersion.getVersionNumber();
* ```
*/
@Plugin({
plugin: 'cordova-plugin-app-version',
pluginRef: 'cordova.getAppVersion',
repo: 'https://github.com/whiteoctober/cordova-plugin-app-version',
platforms: ['Android', 'iOS']
})
export class AppVersion {
/**
* Returns the name of the app
* @returns {Promise}
*/
@Cordova()
static getAppName(): Promise<any> { return; }
/**
* Returns the package name of the app
* @returns {Promise}
*/
@Cordova()
static getPackageName(): Promise<any> { return; }
/**
* Returns the build identifier of the app
* @returns {Promise}
*/
@Cordova()
static getVersionCode(): Promise<any> { return; }
/**
* Returns the version of the app
* @returns {Promise}
*/
@Cordova()
static getVersionNumber(): Promise<any> { return; }
}