React-native: "iPhone X" simulator is disabled

Created on 22 Sep 2019  ·  10Comments  ·  Source: facebook/react-native

React Native version: 0.60.4

Steps to reproduce

스크린샷 2019-09-22 오후 10 17 33

The Xcode is updated version 11 and the "iPhone X" simulator is disabled and cannot be run with an existing "react-native run-ios".

Bug Stale

Most helpful comment

Go to node_modules>@react-native-community>cli>build>commands>runIOS>findMatchingSimulator.js

Change the 'YES' in this line to true:

if (simulator.availability !== '(available)' && simulator.isAvailable !== true) {
continue;

This is how I got it working.

Thanks!

All 10 comments

I have the same issue! Please fix!

https://github.com/react-native-community/cli/issues/739#issuecomment-533885641

But still, this is not building… You can also add Iphone X back by managing device in Xcode

Same issue, RN 0.59.10. The work around does not work.

Go to node_modules>@react-native-community>cli>build>commands>runIOS>findMatchingSimulator.js

Change the 'YES' in this line to true:

if (simulator.availability !== '(available)' && simulator.isAvailable !== true) {
continue;

This is how I got it working.

Thanks!

The iPhone X simulator has been replaced in Xcode 11 with the newer iPhone 11. It seems React is hard-coded to look for iPhone X. Seems odd to me there's no easy way to override this in the project config files.

You can specify the newer simulator using:

react-native run-ios --simulator "iPhone 11"

I found another way.

open Xcode > Add Additional Simulators > Create a new Simulator >
Device type > iPhone X > Create

Now you can run it without an "--simulator " option

@Resten1497 comment will work. For some reason, after the latest Xcode update, iPhone X was not present in the default list of simulators.

Adding an iPhoneX simulator is not working for me, on 0.59.8. I have 4 simulators for iPhone X, with 12.0, 12.1, 12.2 and 13.0 iOS versions and am still getting the same error message. Is there a specific version of iOS simulator that I need to re-install?

Editing the node_modules/react-native files is not an option for me as I'm working off of a git repository and need to fix this for others at my organization.

I found that iPhone X is not installed in Xcode 11.

스크린샷 2019-09-30 오후 6 17 31

You can build the app with this command as below
~$ react-native run-ios --simulator "iPhone 8"

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grabbou picture grabbou  ·  3Comments

despairblue picture despairblue  ·  3Comments

josev55 picture josev55  ·  3Comments

jlongster picture jlongster  ·  3Comments

madwed picture madwed  ·  3Comments