From 115e12fb8f321889c95aaf6a74acb8d0a1e50de1 Mon Sep 17 00:00:00 2001 From: Nathan Newyen Date: Mon, 1 Dec 2025 00:38:30 -0500 Subject: [PATCH 1/2] docs(package_info_plus): add installerStore values documentation Closes #1468 --- .../package_info_plus/README.md | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/packages/package_info_plus/package_info_plus/README.md b/packages/package_info_plus/package_info_plus/README.md index f93ef0261d..670d27c935 100644 --- a/packages/package_info_plus/package_info_plus/README.md +++ b/packages/package_info_plus/package_info_plus/README.md @@ -48,6 +48,49 @@ String version = packageInfo.version; String buildNumber = packageInfo.buildNumber; ``` +## Installer Store + +The `installerStore` property indicates which app store installed the application. This is useful for directing users to the appropriate store page for ratings or updates. + +```dart +String? installerStore = packageInfo.installerStore; +``` + +### iOS + +On iOS, the `installerStore` value is determined by checking the app store receipt path: + +| Environment | `installerStore` value | +|-------------|------------------------| +| App Store | `com.apple` | +| TestFlight | `com.apple.testflight` | +| Simulator | `com.apple.simulator` | + +### Android + +On Android, the value is the package name of the app store that installed the application, obtained via `PackageManager.getInstallSourceInfo()` (Android 11+) or `PackageManager.getInstallerPackageName()` (older versions). + +| Store | `installerStore` value | +|-------|------------------------| +| Google Play Store | `com.android.vending` | +| Amazon Appstore | `com.amazon.venezia` | +| Samsung Galaxy Store | `com.sec.android.app.samsungapps` | +| Huawei AppGallery | `com.huawei.appmarket` | +| Xiaomi GetApps | `com.xiaomi.mipicks` | +| OPPO App Market | `com.oppo.market` | +| VIVO App Store | `com.vivo.appstore` | +| Manual/ADB install | `null` | + +**Note:** Some stores may not properly implement the installer package name API, which could result in `null` being returned even for store installations. + +### macOS + +On macOS, `installerStore` always returns `null` as there is no reliable way to detect the installation source. + +### Other Platforms + +On Linux, Windows, and Web, `installerStore` returns `null`. + ## Known Issues ### iOS From 45996ad5de7ef31ee774379ff3b7958cffc9e434 Mon Sep 17 00:00:00 2001 From: Volodymyr Buberenko Date: Sun, 7 Dec 2025 17:28:54 +0200 Subject: [PATCH 2/2] chore(package_info_plus): Update InstallerStore description in the README.md Updated README.md to clarify installerStore information for various platforms. --- .../package_info_plus/package_info_plus/README.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/package_info_plus/package_info_plus/README.md b/packages/package_info_plus/package_info_plus/README.md index 670d27c935..6ec499a79d 100644 --- a/packages/package_info_plus/package_info_plus/README.md +++ b/packages/package_info_plus/package_info_plus/README.md @@ -48,15 +48,16 @@ String version = packageInfo.version; String buildNumber = packageInfo.buildNumber; ``` -## Installer Store +### Installer Store The `installerStore` property indicates which app store installed the application. This is useful for directing users to the appropriate store page for ratings or updates. ```dart +PackageInfo packageInfo = await PackageInfo.fromPlatform(); String? installerStore = packageInfo.installerStore; ``` -### iOS +#### iOS On iOS, the `installerStore` value is determined by checking the app store receipt path: @@ -66,7 +67,7 @@ On iOS, the `installerStore` value is determined by checking the app store recei | TestFlight | `com.apple.testflight` | | Simulator | `com.apple.simulator` | -### Android +#### Android On Android, the value is the package name of the app store that installed the application, obtained via `PackageManager.getInstallSourceInfo()` (Android 11+) or `PackageManager.getInstallerPackageName()` (older versions). @@ -83,13 +84,9 @@ On Android, the value is the package name of the app store that installed the ap **Note:** Some stores may not properly implement the installer package name API, which could result in `null` being returned even for store installations. -### macOS - -On macOS, `installerStore` always returns `null` as there is no reliable way to detect the installation source. - -### Other Platforms +#### Other Platforms -On Linux, Windows, and Web, `installerStore` returns `null`. +On MacOS, Linux, Windows, and Web, `installerStore` returns `null`. ## Known Issues