I would like to determine in react native code if the app is running in Expo Go or as a stand-alone iOS/Android app.
I can’t use __DEV__
, because I would like to be able to determine this also for a production build.
You can use Expo's AppOwnership
from Constants
import Constants from 'expo-constants'
const isRunningInExpoGo = Constants.appOwnership === 'expo'