expo: "Xcode must be fully installed before you can continue".

Summary

I’ve just set up a new M2 MacBook Pro and attempted to run npx expo start -c --ios. I get the following error (note the Xcode splash screen, indicating that it is indeed installed):

image

(for searchability: Xcode must be fully installed before you can continue. Continue to the App Store?)

I have also installed the Xcode command line tools and restarted my machine and this did not help.

What platform(s) does this occur on?

iOS

SDK Version

48

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.2.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 19.8.0 - /opt/homebrew/bin/node
      npm: 9.5.1 - /opt/homebrew/bin/npm
    IDEs:
      Xcode: /undefined - /usr/bin/xcodebuild
    npmPackages:
      expo: ^48.0.0 => 48.0.6 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.71.3 => 0.71.3 
    Expo Workflow: managed

Minimal reproducible example

npx create-expo-app y (enter/return) cd my-app npx expo start -c --ios

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 29
  • Comments: 49

Commits related to this issue

Most upvoted comments

The fix for this was:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

However I still consider this to be a bug as the CLI is giving me the wrong instructions here.

I just opened Xcode, then went to Settings... > Locations.

Then tap the Command Line Tools dropdown (this might already have it selected, BUT TAP IT ANYWAYS). You’ll be prompted with your machine password. Once you do that, try running yarn ios or the npm equivalent again it should work. At least that’s all I did and it started working.

screenshot

The fix for this was:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

However I still consider this to be a bug as the CLI is giving me the wrong instructions here.

This worked! Thank you!

Also worked for me, but what is it doing actually? Can someone explain this?

I know very little about XCode but I suspect there’s a sort of “global variable” (likely an environment variable I would guess) at the system level pointing to the current XCode installation, and that isn’t being set by the XCode installer. Expo is likely looking this “global variable” up, seeing that it isn’t set, and assuming that XCode isn’t installed.

It’s almost always going to be at /Applications/Xcode.app/Contents/Developer so setting that “global variable” to there almost always works.

The fix for this was:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

However I still consider this to be a bug as the CLI is giving me the wrong instructions here.

That is works for me! 😃

here’s how I fixed it. by selecting on Xcode version. we can say that it is already selected by default but in fact no, it is.

go to the Xcode settings then on “location” and select the version of Xcode located right next to “command Line Tools”. sorry if my english is bad. I speak French better. I did my best to explain

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Also worked for me, but what is it doing actually? Can someone explain this?

The fix for this was:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

However I still consider this to be a bug as the CLI is giving me the wrong instructions here.

This worked for me, thanks

Tried it and got this error: xcode-select: error: invalid developer directory '/Applications/Xcode.app/Cont

I have the most recent version of Xcode my computer can handle installed.