hasPackageIdentity static method

bool hasPackageIdentity()

Returns whether the current app was installed with an MSIX installer.

Using an MSIX grants your application package identity, which allows it to use certain APIs.

Specifically, using an MSIX installer allows your app to:

These functions will simply do nothing or return empty data in apps without package identity. Additionally:

  • WindowsImage.getAssetUri will return a file:/// or ms-appx:/// URI, depending on whether the app is running in debug, release, or as an MSIX.
  • WindowsNotificationAudio.asset takes an audio file to use for apps with package identity, and a preset fallbacks for apps without.

Implementation

static bool hasPackageIdentity() => false;