The command is simple:
npx react-native run-ios --simulator="<Your Simulator Name>"
To get the exact text for each simulator, you need to hop into Xcode:
- Open Xcode,
- Then open the
Window
>Devices and Simulators
menu. - Select the
Simulators
tab in the sidebar on the left. - You’ll see the list of available simulators in the left sidebar. Click on the name to make it editable. Select all and copy as usual.
- Finally, paste your simulator name into your command and your app should build into the selected simulator:
Remember to surround your simulator name in inverted commas
npx react-native run-ios --simulator="iPhone 11 Pro"