Ionic App Version


Ionic App Version – Cordova plugin app version is used to get the app version. Here in this tutorial we are going to explain how you can install this plugin and use it.


Ionic App Version | Native App Version Plugin

First, install the cordova plugin cordova-plugin-app-version, you can install this plugin simply as below- –

Ionic App Version | Native App Version Plugin:

$ ionic plugin add --save cordova-plugin-app-version
$ npm install --save @ionic-native/app-version

This plugin reads the app version from the target build.

Supported Platforms

  • Android
  • Ios

Example

You can get the app version details simply as below-

Ionic Get App Version Example

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

constructor(private appVersion: AppVersion) { }

...


this.appVersion.getAppName();
this.appVersion.getPackageName();
this.appVersion.getVersionCode();
this.appVersion.getVersionNumber();
  • getAppName– This returns the app name.
  • getPackageName– This returns the app package name.
  • getVersionCode– This returns the app version code.
  • getVersionNumber– This returns the app version number.

Advertisements

Add Comment

📖 Read More