Running React Native apps on the Android Emulator. I’ve been playing with React Native (v0.30) and had been testing my toy application on the iPhone simulator. Since one of the promises of React Native is the ability to share a large amount of code between platforms, I tried to run my app on the Android emulator but ran into some minor niggles. Jul 20, 2018 - Running Create React Native App for the first time on an emulator can be somewhat tedious to those who just getting started and have no idea.
Starting the simulator Once you have your React Native project initialized, you can run react-native run-ios inside the newly created project directory. If everything is set up correctly, you should see your new app running in the iOS Simulator shortly. Specifying a device You can specify the device the simulator should run with the -simulator flag, followed by the device name as a string. The default is 'iPhone X'. If you wish to run your app on an iPhone 4s, just run react-native run-ios -simulator='iPhone 4s'.
The device names correspond to the list of devices available in Xcode. You can check your available devices by running xcrun simctl list devices from the console.
It's always a good idea to test your app on an actual device before releasing it to your users. This document will guide you through the necessary steps to run your React Native app on a device and to get it ready for production. If you used Expo CLI or Create React Native App to set up your project, you can preview your app on a device by scanning the QR code with the Expo app. In order to build and run your app on a device, you will need to eject and install the native code dependencies from the.