How to run React Native project on specific iOS simulator

Run react-native on specific iOS simulator :

You can run one react native project on a specific iOS simulator device. Open one terminal and run the below command to list down all available simulators :

xcrun simctl list devices

You will get one list like :

iPhone 5s
iPhone 6 Plus
iPhone 6
iPhone 6s

Now, use the below command to run the project on a specific simulator :

npx react-native run-ios --simulator="iPhone 6"

That’s it.

Change default simulator :

You can add one new script in default.json with your default simulator :

"ios-default" : "npx react-native run-ios --simulator \"iPhone 6\""

Now, just use npm run ios-default to execute this command.

Where is the color and why codevscolor ?

Long story short, I love paintings and I paint on weekends. We(me and my wife) have one Youtube channel. Below is a video that I did recently. If you love this please do subscribe to support us 😊