Search docs/

AppVersion

v0.1.9

Contents

Installation

After following the one-time setup steps, simply install the plugin:

Cordova:ionic cordova plugin add @ionic-enterprise/app-version Capacitor:npm install @ionic-enterprise/app-version npx cap sync

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