ionic-native
Version:
Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support
72 lines • 2.56 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
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();
* ```
*/
export var AppVersion = (function () {
function AppVersion() {
}
/**
* Returns the name of the app
* @returns {Promise<any>}
*/
AppVersion.getAppName = function () { return; };
/**
* Returns the package name of the app
* @returns {Promise<any>}
*/
AppVersion.getPackageName = function () { return; };
/**
* Returns the build identifier of the app
* @returns {Promise<any>}
*/
AppVersion.getVersionCode = function () { return; };
/**
* Returns the version of the app
* @returns {Promise<any>}
*/
AppVersion.getVersionNumber = function () { return; };
__decorate([
Cordova()
], AppVersion, "getAppName", null);
__decorate([
Cordova()
], AppVersion, "getPackageName", null);
__decorate([
Cordova()
], AppVersion, "getVersionCode", null);
__decorate([
Cordova()
], AppVersion, "getVersionNumber", null);
AppVersion = __decorate([
Plugin({
pluginName: 'AppVersion',
plugin: 'cordova-plugin-app-version',
pluginRef: 'cordova.getAppVersion',
repo: 'https://github.com/whiteoctober/cordova-plugin-app-version',
platforms: ['Android', 'iOS']
})
], AppVersion);
return AppVersion;
}());
//# sourceMappingURL=appversion.js.map