App Version
The App Version plugin provides access to your app's metadata, including app name, package name, and version number.
#
InstallationIf you have not already setup Ionic Enterprise in your app, follow the one-time setup steps.
Next, install the plugin:
- Capacitor
- Cordova
#
Index#
Classes#
Classes#
AppVersionusage:
#
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
>