Search code examples
iosipadreact-native

open iOS iPad simulator with React Native


When testing a React Native app with react-native run-ios it opens an iPhone simulator.

You can change the virtual device to an iPad in the Simulator options, but the React Native app does not appear in the list of installed apps.

Is there a way to open an iPad simulator from the CLI?


Solution

  • --simulator flag is what you are looking for

    For example react-native run-ios --simulator 'iPad 2' will run the app on iPad 2 simulator.

    As a side node, if you need to get list of available simulators with their names use xcrun simctl list devices