AppVersion

v0.1.9

Contents

Installation

In order to use Ionic Enterprise Edition plugins you should make sure you're using the Ionic Enterprise Cordova CLI as the regular version can have issues with scoped plugins.

npm uninstall -g cordovanpm install -g @ionic-enterprise/cordova

Once you've installed the Ionic Enterprise Cordova CLI you can install the plugin.

ionic enterprise register --key=YOURPRODUCTKEYionic cordova plugin add @ionic-enterprise/app-version

Index

Classes


Classes

AppVersion

AppVersion:

name: App Version

description: Reads the version of your app from the target build settings.

usage:

import { AppVersion } from '@ionic-enterprise/app-version/ngx';

constructor(private appVersion: AppVersion) { }

...

this.appVersion.getAppName();
this.appVersion.getPackageName();
this.appVersion.getVersionCode();
this.appVersion.getVersionNumber();

getAppName

getAppName(): Promise<string>

Returns the name of the app, e.g.: "My Awesome App"

Returns: Promise<string>


getPackageName

getPackageName(): Promise<string>

Returns the package name of the app, e.g.: "com.example.myawesomeapp"

Returns: Promise<string>


getVersionCode

getVersionCode(): Promise<string | number>

Returns the build identifier of the app. In iOS a string with the build version like "1.6095" In Android a number generated from the version string, like 10203 for version "1.2.3"

Returns: Promise<string | number>


getVersionNumber

getVersionNumber(): Promise<string>

Returns the version of the app, e.g.: "1.2.3"

Returns: Promise<string>



Other Versions