expo-store-checker
v0.1.1
Published
Expo/React Native module to detect app install source (Flutter store_checker port).
Downloads
790
Maintainers
Readme
Expo Store Checker
An Expo/React Native module that detects where the current app was installed from (Play Store, App Store, TestFlight, etc.).
This is a port of the Flutter package store_checker.
Install
npm install expo-store-checker
# or
yarn add expo-store-checkerExpo (managed)
This module contains native code, so you must use a development build or prebuild/EAS Build:
npx expo prebuildUsage
import { getSource, Source } from 'expo-store-checker';
const source = await getSource();
if (source === Source.IS_INSTALLED_FROM_PLAY_STORE) {
// Play Store
}getSourceAsync is also exported as an alias of getSource.
Sources
Android
IS_INSTALLED_FROM_PLAY_STOREIS_INSTALLED_FROM_PLAY_PACKAGE_INSTALLERIS_INSTALLED_FROM_RU_STOREIS_INSTALLED_FROM_LOCAL_SOURCEIS_INSTALLED_FROM_AMAZON_APP_STOREIS_INSTALLED_FROM_HUAWEI_APP_GALLERYIS_INSTALLED_FROM_SAMSUNG_GALAXY_STOREIS_INSTALLED_FROM_SAMSUNG_SMART_SWITCH_MOBILEIS_INSTALLED_FROM_OPPO_APP_MARKETIS_INSTALLED_FROM_XIAOMI_GET_APPSIS_INSTALLED_FROM_VIVO_APP_STOREIS_INSTALLED_FROM_OTHER_SOURCE
iOS
IS_INSTALLED_FROM_APP_STOREIS_INSTALLED_FROM_TEST_FLIGHTIS_INSTALLED_FROM_LOCAL_SOURCE(enterprise/adhoc/sideloaded)UNKNOWN
Notes
- On iOS, TestFlight is detected using the sandbox receipt heuristic.
- On Android, this module uses the installer package name reported by the system.
- Web always returns
UNKNOWN.
License
MIT
