Why this happens
React Native’s CLI includes a simulator detection utility (findMatchingSimulator.js) that filters available simulators by their runtime identifier. Older versions of this utility check if the runtime string starts with "iOS" or "tvOS" to exclude watchOS and other device types.
Starting with Xcode 10, the xcrun simctl list --json command returns runtime identifiers in a fully qualified bundle format such as com.apple.CoreSimulator.SimRuntime.iOS-12-1 instead of the short iOS-12-1 format. React Native’s version check fails to recognize these new identifiers, so it filters out all iOS simulators and throws “Could not find iPhone X simulator” (or whatever simulator name was requested).
The issue is purely in React Native’s JavaScript tooling — Xcode and the simulator itself work correctly, which is why building and running from Xcode succeeds.
How to fix it
1. Update React Native (recommended)
React Native 0.60 and later include a fix that accepts both the legacy and the fully qualified runtime identifier formats. Upgrading your project resolves the issue without any manual patches.
# In your project root
npm install react-native@latest
# or
yarn upgrade react-native@latest
After upgrading, run the migration steps if prompted (npx react-native upgrade), then clean and reinstall:
npm install
# or
yarn install
2. Patch the simulator detection (workaround for older RN versions)
If you cannot upgrade React Native immediately, modify the version check in the local CLI copy inside node_modules.
- Open
node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js. - Locate the filter that validates the runtime version (around line 50 in older versions):
// Making sure the version of the simulator is an iOS or tvOS (Removes Apple Watch, etc)
if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
continue;
}
- Replace it with a check that also accepts the fully qualified bundle identifier:
// Accept both legacy (iOS-12-1) and fully qualified (com.apple.CoreSimulator.SimRuntime.iOS-12-1) formats
const isIOS = version.startsWith('iOS') || version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS');
const isTVOS = version.startsWith('tvOS') || version.startsWith('com.apple.CoreSimulator.SimRuntime.tvOS');
if (!isIOS && !isTVOS) {
continue;
}
- Save the file and run
react-native run-iosagain.
Note: This patch will be lost if you reinstall
node_modules. Consider usingpatch-packageto persist the change across installs.
3. Specify an available simulator explicitly
As a temporary workaround, you can bypass the automatic detection by telling the CLI exactly which simulator UDID or name to use:
# List available simulators
xcrun simctl list devices available
# Run on a specific device by name
react-native run-ios --simulator="iPhone 15"
# Or by UDID
react-native run-ios --udid=<DEVICE_UDID>
This skips the faulty matching logic entirely.
How to prevent it
- Keep React Native updated; the fix has been in the main branch since mid-2019.
- Use
patch-packageto maintain any necessary local patches acrossnpm install/yarn installcycles. - Prefer explicit
--simulatoror--udidflags in CI scripts to avoid ambient environment differences. - Run
xcrun simctl list --jsonperiodically to verify the runtime identifier format your Xcode version emits.
FAQ
Why does the error mention iPhone X specifically?
The default simulator name in older React Native templates was “iPhone X”. The error message interpolates the requested simulator name (args.simulator), so it reflects whatever default or configured value your project uses.
Does this affect Android or physical iOS devices?
No. The error only occurs when the React Native CLI tries to select an iOS simulator. Building for a physical device (react-native run-ios --device) or Android (react-native run-android) uses different code paths.
Will npm audit fix resolve this?
npm audit fix only addresses security vulnerabilities in dependencies. It does not update React Native to a version containing the simulator detection fix. You must explicitly upgrade the react-native package.
Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.