I'm running npm inside the react-native app
Just downloaded latest npm and xcode
Reproduce: Running npm run ios, I get that it can't find simulator for "iPhoneX"
Fix / Bugs: in local-cli/runIOS/findMatchingSimulator.js:
L42 which checks that the version of the simulator is an iOS or tvOS always fails (namely, the version of the simulator is com.apple.[some other things].iOs/tvOS. Namely the following if statement checks that the version starts with iOS or tvOS when it should be checking that of the text following the latest period, the text starts with iOs or tvOS.
L55 which was supposed to fix this bug, the isAvailable field is actually boolean true instead of string 'YES'
Can you run react-native info
and edit your issue to include these results under the Environment section?
If you believe this information is irrelevant to the reported issue, you may write [skip envinfo]
under Environment to let us know.
We are automatically closing this issue because it does not appear to follow any of the provided issue templates.
馃憠 Click here if you want to report a reproducible bug or regression in React Native.
change this file:
/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
line 42, to: if (!version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('tvOS')) {
That change works for me, after I have installed latest xcode beta, and removed the beta.
Facing this after Xcode simulators update to 12.2 (RN 0.57.8).
For the one who did an update of xCode simulators update. (appeared 27 March 2019)
This file:
/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
Find line 42, and replace
if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
with something like this:
if (!version.includes('iOS') && !version.includes('tvOS')) {
You still will be able to build your project with xCode.
I would like to add that it works when building directly from Xcode.
Most helpful comment
For the one who did an update of xCode simulators update. (appeared 27 March 2019)
This file:
/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
Find line 42, and replace
with something like this:
You still will be able to build your project with xCode.