Skip to content

Instantly share code, notes, and snippets.

@rexlow
Last active April 22, 2023 16:11
Show Gist options
  • Save rexlow/bd76271bfcf0f416845b204d9f37f48a to your computer and use it in GitHub Desktop.
Save rexlow/bd76271bfcf0f416845b204d9f37f48a to your computer and use it in GitHub Desktop.
Run React Native on specific iOS simulator version
To add a simulator
Choose Hardware > Device > Manage Devices.
Xcode opens the Devices window.
At the bottom of the left column, click the Add button (+).
In the dialog that appears, enter a name in the Simulator Name text field and choose the device from the Device Type pop-up menu.
//by default
//react-native run-ios
//iPhone 4
react-native run-ios --simulator "iPhone ${1:-4}"
//iPhone 4s
react-native run-ios --simulator "iPhone ${1:-4s}"
//iPhone 5
react-native run-ios --simulator "iPhone ${1:-5}"
//iPhone 5s
react-native run-ios --simulator "iPhone ${1:-5s}"
//iPhone 6
react-native run-ios --simulator "iPhone ${1:-6}"
//iPhone 6 Plus
react-native run-ios --simulator "iPhone ${1:-6 Plus}"
//iPhone 6s
react-native run-ios --simulator "iPhone ${1:-6s}"
//iPhone 6s Plus
react-native run-ios --simulator "iPhone ${1:-6s Plus}"
//iPad 2
react-native run-ios --simulator "iPad ${1:-2}"
//iPad Retina
react-native run-ios --simulator "iPad ${1:-Retina}"
//iPad Air
react-native run-ios --simulator "iPad ${1:-Air}"
//iPad Air 2
react-native run-ios --simulator "iPad ${1:-Air 2}"
//iPad Pro
react-native run-ios --simulator "iPad ${1:-Pro}"
https://s12.postimg.org/tqqnsm6wd/Screen_Shot_2016_12_03_at_5_28_53_PM.png
@sturmenta
Copy link

react-native run-ios --simulator "iPhone ${1:-SE}"
react-native run-ios --simulator "iPhone ${1:-X}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment