Skip to main content

App Version

EOL Notice

App Version will reach its end-of-life on July 1, 2024, and will no longer receive updates or support. Please see Support Policy for additional information.

The App Version plugin provides access to your app's metadata, including app name, package name, and version number.

Installation

If you have not already setup Ionic Enterprise in your app, follow the one-time setup steps.

Next, install the plugin:

npm install @ionic-enterprise/app-version
npx cap sync

Index

Classes


Classes

AppVersion

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>