0.6.0 • Published 9 months ago

expo-app-environment v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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 or 127.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

0.5.0

9 months ago

0.4.0

9 months ago

0.6.0

9 months ago

0.3.0

9 months ago

0.2.0

9 months ago

0.1.0

9 months ago