In a Obj-C iOS app I can use #if (TARGET_IPHONE_SIMULATOR)
to write simulator-only code.
In react native I can use:
if (__DEV__) {
.. do something special
}
.. to detect development mode.
We can use Platform.OS === 'ios'
to detect the platform (Android/iOS).
See here for more info Platform Docs
But how do we detect if the app is running in the simulator?
The reason I ask is that my app uses the camera to scan barcodes, and this isn't supported in the iOS Simulator.