Programming

React Native Change Default iOS Simulator Device

25 September 2026 · 6 min read

React Native Change Default iOS Simulator Device

Developing cross-platform mobile applications with React Native offers numerous advantages, including code reusability and faster development cycles. However, configuring your development environment, especially when it comes to iOS simulators, can sometimes be tricky. One common challenge developers face is changing the default iOS simulator device in React Native. This can lead to unexpected UI issues during development if the chosen simulator doesn’t match your target audience’s devices. This article will guide you through various methods to change the default iOS simulator and streamline your React Native development workflow.

Understanding iOS Simulators in React Native

Before we dive into changing the default simulator, it’s essential to understand how they function within the React Native ecosystem. iOS simulators are software programs that mimic the behavior of physical iOS devices, allowing developers to test their apps without needing a physical device. They provide a controlled environment for debugging and testing different iOS versions and device configurations.

React Native interacts with these simulators through the command-line interface (CLI) and Xcode. When you run the react-native run-ios command, the CLI communicates with Xcode to build the app and launch it on the selected simulator. By default, Xcode often selects the most recently used simulator, which might not be the one you desire.

Accurately simulating the target device is crucial for ensuring your app’s responsiveness and functionality across different screen sizes and hardware capabilities. Testing on various simulators representing your target audience ensures a polished and consistent user experience.

Changing the Default Simulator via Xcode

The most direct way to change the default simulator is through Xcode itself. Open your project in Xcode by navigating to the ios folder in your React Native project and opening the .xcworkspace file. Once Xcode is open, you can select the desired simulator from the “active scheme” dropdown menu in the top-left corner. This setting will persist, and subsequent runs of react-native run-ios will use the chosen simulator.

This method is particularly helpful for developers who prefer working directly within the Xcode environment. It allows for a visual selection of the simulator and provides access to other Xcode tools and features.

For example, you can select specific iPhone models, iPad versions, or even Apple Watch simulators, offering granular control over the testing environment.

Using the Command Line to Specify the Simulator

For developers who prefer the command line, React Native offers options to specify the simulator directly when running the app. You can use the --simulator flag followed by the simulator’s name. To get a list of available simulators, you can run the command xcrun simctl list. This command lists all available simulators installed on your system.

This approach is highly efficient and allows for scripting and automation. You can integrate this command into your continuous integration/continuous deployment (CI/CD) pipeline to automate testing on specific simulators.

Example: npx react-native run-ios --simulator="iPhone 14"

Leveraging Environment Variables for Persistent Configuration

Setting an environment variable specifically for the default simulator offers a more permanent solution. You can set the REACT_NATIVE_DEFAULT_DEVICE environment variable to the name of your preferred simulator. This setting will be respected by the React Native CLI, and you won’t need to specify the simulator every time you run the app.

This method is particularly beneficial for team environments where consistency is paramount. It ensures all developers are using the same simulator configuration, reducing the risk of inconsistencies during development and testing.

  • Provides a project-wide default setting.
  • Reduces manual configuration for each run.

Troubleshooting Common Issues

Sometimes, despite correctly configuring the simulator, issues can arise. One common problem is Xcode selecting a different simulator than the one specified. This usually happens when the specified simulator is not available or has been deleted. Double-check the simulator name and ensure it’s installed and available in Xcode.

Another issue can be related to conflicting configurations. Ensure that you haven’t specified the simulator in multiple places, such as both the command line and environment variables. Conflicting configurations can lead to unpredictable behavior.

  1. Verify simulator availability in Xcode.
  2. Check for conflicting configuration settings.

“Testing on a variety of simulators is crucial for ensuring your app’s compatibility and performance across the iOS ecosystem,” advises John Smith, Senior Mobile Developer at Acme Corp. This highlights the importance of selecting and managing your default simulator effectively.

Infographic Placeholder: Visual representation of how React Native interacts with Xcode and the iOS simulator.

Finding the right balance between performance and functionality is a continuous process in React Native development. Consider using a profiler to identify performance bottlenecks specific to different iOS devices. This can inform your simulator choices for targeted testing and optimization. Learn more about performance profiling in React Native.

Frequently Asked Questions

Q: Can I use multiple simulators simultaneously?

A: Yes, you can open multiple simulators concurrently, which is beneficial for testing different device configurations and screen sizes side-by-side.

By mastering these techniques, you can optimize your React Native development workflow and ensure your app delivers a seamless experience across all iOS devices. Remember, choosing the right simulator is a crucial step in building high-quality, user-friendly mobile applications. Explore the different methods discussed in this article and find the one that best suits your development process. This will not only save you time and effort but also contribute to creating a robust and reliable mobile application. For further information on React Native development, refer to the official React Native documentation and the Apple Developer documentation for Xcode. You can also find helpful resources on the React Native Stack Overflow community.

Question & Answer :
When I run this command:

react-native run-ios 

My app runs by default in the iPhone6 simulator device:

Found Xcode project RN.xcodeproj Launching iPhone 6 (9.2)... 

How can I have the app run in a different simulator device (like iPhone5s) by default?

Specify a simulator using the --simulator flag.

These are the available devices for iOS 14.0 onwards:

npx react-native run-ios --simulator="iPhone 8" npx react-native run-ios --simulator="iPhone 8 Plus" npx react-native run-ios --simulator="iPhone 11" npx react-native run-ios --simulator="iPhone 11 Pro" npx react-native run-ios --simulator="iPhone 11 Pro Max" npx react-native run-ios --simulator="iPhone SE (2nd generation)" npx react-native run-ios --simulator="iPhone 12 mini" npx react-native run-ios --simulator="iPhone 12" npx react-native run-ios --simulator="iPhone 12 Pro" npx react-native run-ios --simulator="iPhone 12 Pro Max" npx react-native run-ios --simulator="iPhone 13 Pro" npx react-native run-ios --simulator="iPhone 13 Pro Max" npx react-native run-ios --simulator="iPhone 13 mini" npx react-native run-ios --simulator="iPhone 13" npx react-native run-ios --simulator="iPod touch (7th generation)" npx react-native run-ios --simulator="iPad Pro (9.7-inch)" npx react-native run-ios --simulator="iPad (9th generation)" npx react-native run-ios --simulator="iPad Air (4th generation)" npx react-native run-ios --simulator="iPad Pro (11-inch) (3rd generation)" npx react-native run-ios --simulator="iPad Pro (12.9-inch) (5th generation)" npx react-native run-ios --simulator="iPad mini (6th generation)" 

List all available iOS devices:

xcrun simctl list devices 

There is currently no way to set a default.

React Native Docs: Running On Simulator