Package Information
Tip
This article covers Uno-specific information for ApplicationModel. For a full description of the feature and instructions on using it, see Windows.ApplicationModel Namespace.
- The
Windows.ApplicationModel.PackageId
class allows retrieving information about the application package.
PackageId
Android
- Due to the fact that version strings can be arbitrary on Android, we first try to parse
PackageInfo.VersionName
, if it fails, we try to usePackageInfo.LongVersionCode
, and if that fails (this is along
value while WinUI usesushort
), we fall back to default to avoid exceptions (1.0.0.0). FamilyName
andName
properties have the same value as thePublisher
and cannot be retrieved programmatically.FullName
property ends with the value ofLongVersionCode
, similar to WinUI, where it contains the app version.
iOS
- Version strings may potentially be arbitrary on iOS as well (such version string would fail validation only during App Store upload), so we first try to parse the user-facing
CFBundleShortVersionString
, if it fails, we try to useCFBundleVersion
and if that fails, we fall back to default to avoid exceptions (1.0.0.0). FamilyName
andName
properties have the same value as thePublisher
cannot be retrieved programmatically.FullName
property ends with the value ofCFBundleVersion
, similarly to WinUI, where it contains the app version.