Skip to main content

@napacitor/app-info

App information plugin wrapping the .NET MAUI AppInfo and VersionTracking APIs: app name, version, theme, version tracking, and more.

Installation​

To use npm:

npm install @napacitor/app-info

To use yarn:

yarn add @napacitor/app-info

Sync native files:

npx nap sync

Usage​

import { AppInfo } from '@napacitor/app-info';

// Get app information
const info = await AppInfo.getInfo();
console.log(info.name, info.version, info.build, info.theme);

// Get version tracking information
const vt = await AppInfo.getVersionTracking();
console.log('First launch ever:', vt.isFirstLaunchEver);
console.log('First launch for current version:', vt.isFirstLaunchForCurrentVersion);
console.log('Version history:', vt.versionHistory);

// Show the app info dialog (some platforms)
await AppInfo.showSettingsUI();

// Open the app's system settings
await AppInfo.openSettings();

How It Works​

Wraps the .NET MAUI AppInfo.Current and VersionTracking.Default facades. getVersionTracking() calls Track() first to ensure correct counts; requestedLayoutOrientation is read via DeviceDisplay.Current.MainDisplayInfo.Orientation; openSettings() maps to AppInfo.Current.ShowSettingsUI().

Permissions​

Android​

No additional configuration required.

iOS​

No additional configuration required.

Windows​

No additional configuration required.

API​

getInfo()​

Gets app information.

Returns: Promise<AppInfoData>

getVersionTracking()​

Gets version tracking information (calls Track() automatically on first use).

Returns: Promise<VersionTrackingData>

showSettingsUI()​

Shows the app info dialog. MAUI has no built-in ShowSettingsUI; currently a no-op extension point for platforms without a built-in settings UI.

Returns: Promise<void>

openSettings()​

Opens the app's system settings page (maps to AppInfo.Current.ShowSettingsUI()).

Returns: Promise<void>

Interfaces​

AppInfoData​

PropTypeDescription
namestringApp name (display name).
idstringPackage name (Android) / Bundle ID (iOS) / App ID (Windows).
versionstringVersion number (e.g. 1.2.3).
buildstringBuild number (e.g. 100).
themestringTheme mode: light / dark / system.
requestedLayoutOrientationstringRequested layout orientation: portrait / landscape / unspecified.

VersionTrackingData​

PropTypeDescription
currentVersionstringCurrent version number.
currentBuildstringCurrent build number.
isFirstLaunchEverbooleanWhether this is the first install ever.
isFirstLaunchForCurrentVersionbooleanWhether this is the first launch of the current version.
isFirstLaunchForCurrentBuildbooleanWhether this is the first launch of the current build.
previousVersionstringPrevious version number.
previousBuildstringPrevious build number.
versionHistorystring[]History of versions (newest first).
buildHistorystring[]History of builds (newest first).