- I don't know how to setup default device, but after running react-native run-ios you can change device in Simulator Hardware Device iOS x.x iPhone 5. This will work until you quit simulator. – sealskej Jan 5 '17 at 14:43.
- 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 5s, run react-native run-ios -simulator='iPhone 5s'. The device names correspond to the list of devices available in Xcode.
- Step Four: Run App in Expo on iOS Device Once your server is up and going, you can type either expo start, yarn start, or npm start in the terminal of your React Native project directory. You will be prompted with a QR code along with some options on how to run the app with live reloading. Potential Roadblock.
Starting the simulator#
The React Native Docs recommend using the -simulator flag with react-native run-ios: react-native run-ios -simulator='iPhone 11 Pro Max' If you run into (like I did): command not found: react-native. Try running the script for iOS in your app's package.json (often it's ios): yarn ios -simulator='iPhone 11 Pro Max'.
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#
Type tool meaning. 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 5s, run react-native run-ios --simulator='iPhone 5s'
.
React Native Android Simulator
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.
Starting the simulator
Type tool meaning. 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 5s, run react-native run-ios --simulator='iPhone 5s'
.
React Native Android Simulator
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.
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 6'
. If you wish to run your app on an iPhone 4s, just run react-native run-ios --simulator='iPhone 4s'
.
React Native Run Ios Device
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.