js-apis-inner-app-appVersionInfo.md 757 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# AppVersionInfo

The **AppVersionInfo** module defines the application version information.

**System capability**: SystemCapability.Ability.AbilityRuntime.Core

| Name         | Type    | Readable  | Writable  | Description     |
| ----------- | ------ | ---- | ---- | ------- |
| appName     | string | Yes   | No   | Module name.  |
| versionCode | number | Yes   | No   | Module description.|
| versionName | string | Yes   | No   | Module description ID.|

**Example**
```ts
let appName;
let versionCode;
let versionName;
this.context.getAppVersionInfo((error, data) => {
    console.info('getAppVersionInfo data is:' + JSON.stringify(data));
    appName = data.appName;
    versionCode = data.versionCode;
    versionName = data.versionName;
});
```