create-react-native-app: ios: Unable to verify Xcode and Simulator installation.

I’m getting the following error when running npm run ios:

yarn run v0.20.3
$ react-native-scripts ios
Starting packager...
Starting simulator...
Unable to check Xcode version: Error: Process exited with non-zero code: 1
Failed to start simulator:

Unable to verify Xcode and Simulator installation.

Exiting...

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 23
  • Comments: 24 (4 by maintainers)

Most upvoted comments

Turned out there weren’t any “Command Line Tools” selected in the Xcode settings. After selecting some it worked for me. Here is how it should look like:

image

Hope this helps others running into the same problem 🙂

I think the CLI equivalent of selecting the path from the dropdown is xcode-select -s /Applications/Xcode-beta.app/Contents/Developer (-s is a shorthand for --switch). It would be cool if we could do this automatically somehow, but I think it might require sudo, so maybe not.

In any case, once this is implemented, we should test the full flow (no Xcode – Xcode installed – command line tools installed/selected) and verify that the error message makes sense after each intermediate step.

@brentvatne We certainly can. Perhaps when we detect that Xcode is installed but command line tools are not, we could display a message like:

Xcode command line tools not found. Run the command xcode-select --install to install them.

I ran into this problem after Apple auto-updated my system. Even though I had xCode etc. working previously, the simulator stopped working with React Native because I had not agreed to Apple’s latest terms and conditions. The fix in my case was simply to open xCode and hit “agree”.

Since things have changed after years, this is what worked for me in your terminal run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Then run expo start again

I solved the problem Locations->Command Line Tools for version the xCode line

I feel like the expo package should add a suggestion when this error occurs. Kinda obvious this is a recurring problem. 😄

I solved the problem Locations->Command Line Tools for version the xCode line

This worked for me. The solution was in the XCode Preferences on the Menu Bar (on the Locations Tab, then the Command Line Tools dropdown).

Since things have changed after years, this is what worked for me in your terminal run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Then run expo start again

Thanks @fzchriha Your solution is working for me. Really appreciate 😭

@fson - just ran into this setting up a new machine, can we provide a better error message here?

screen shot 2017-08-08 at 5 10 08 pm