expo-app-environment
v0.6.0
Published
Figure out how your app was installed. Testflight, App Store, or Simulator?
Downloads
466
Maintainers
Readme
expo-app-environment
A simple Expo module to detect how your app was installed - TestFlight, App Store, or Simulator.
Installation
npx expo install expo-app-environment
Usage
import { getEnvironment } from "expo-app-environment";
// Returns: "simulator" | "testflight" | "appstore"
const environment = getEnvironment();
Example
import { getEnvironment } from 'expo-app-environment';
import { Text, View } from 'react-native';
export default function App() {
return (
<View>
<Text>App was installed via: {getEnvironment()}</Text>
</View>
);
}
Return Values
simulator
- iOS: Running in iOS Simulator
- Android: Running in Android Emulator
- Web: Running on
localhost
or127.0.0.1
testflight
- iOS: Installed via TestFlight
- Android: Installed via Internal Testing Track
- Web: N/A
appstore
- iOS: Installed from App Store
- Android: Installed from Google Play Store
- Web: Running on any HTTPS domain
Platform Support
- ✅ iOS
- ✅ Android
- ✅ Web
License
MIT