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'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.