Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find simulator for "iPhoneX" #23256

Closed
sarahtieu opened this issue Feb 2, 2019 · 7 comments
Closed

Can't find simulator for "iPhoneX" #23256

sarahtieu opened this issue Feb 2, 2019 · 7 comments
Labels
Bug Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot. Type: Question Issues that are actually questions and not bug reports.

Comments

@sarahtieu
Copy link

Environment

I'm running npm inside the react-native app
Just downloaded latest npm and xcode

Description

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'

@react-native-bot
Copy link
Collaborator

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.

@hramos hramos added Type: Question Issues that are actually questions and not bug reports. and removed Bug Report labels Feb 2, 2019
@react-native-bot
Copy link
Collaborator

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.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: No Template labels Feb 2, 2019
@eric-PearSports
Copy link

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')) {

@yayajacky
Copy link

That change works for me, after I have installed latest xcode beta, and removed the beta.

@sonaye
Copy link
Contributor

sonaye commented Mar 26, 2019

Facing this after Xcode simulators update to 12.2 (RN 0.57.8).

@d4ins
Copy link

d4ins commented Mar 27, 2019

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.

@sonaye
Copy link
Contributor

sonaye commented Mar 28, 2019

I would like to add that it works when building directly from Xcode.

@facebook facebook locked as resolved and limited conversation to collaborators Feb 2, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Feb 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot. Type: Question Issues that are actually questions and not bug reports.
Projects
None yet
Development

No branches or pull requests

7 participants