Flutter Doctor : Xcode installation is incomplete

8,230

Solution 1

You probably miss the xcode command line tools, you may want to reinstall XCode, or select the xcode command line tools with the command xcode-select

Here's a full fix that should solve your problem: https://github.com/flutter/flutter/issues/6308#issuecomment-257812324

Solution 2

I was facing the same issue. I did not installed Xcode from Apple Store. If your scenario is same, you can try below steps,

  1. Open Xcode
  2. Go to Preferences -> Location tab
  3. You will find "Command Line Tools" option. If it is blank, select the Xcode version from list (see image below). It will ask for password or Touchid to update it.
  4. Run flutter doctor again. It should resolve the issue

enter image description here

Solution 3

This happens because xcode-select developer directory is pointing to another path. To fix this, do as per the instructions given below

  1. Install the latest stable version of Xcode (using web download or the Mac App Store).

  2. Configure the Xcode command-line tools to use the newly-installed version of Xcode by running the following from the command line:

    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    sudo xcodebuild -runFirstLaunch
    

    This is the correct path for most cases, when you want to use the latest version of Xcode. If you need to use a different version, specify that path instead.

  3. Make sure the Xcode license agreement is signed by either opening Xcode once and confirming or running sudo xcodebuild -license from the command line.

Versions older than the latest stable version may still work, but are not recommended for Flutter development. Using old versions of Xcode to target bitcode is not supported, and is likely not to work

Note: Make sure your Xcode app path is correct.

Xcode: /Applications/Xcode.app/Contents/Developer
Xcode-beta: /Applications/Xcode-beta.app/Contents/Developer

Solution 4

If you already have Xcode and this happens. Just run this command

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

And

sudo xcodebuild -runFirstLaunch

It will automatically show

Solution 5

So, I was facing this same issue, and tried to and copy paste the command already given. Namely

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

But why did it not work? Silly mistake of mine: I have two Xcode versions in my Applications folder. One is called Xcode_12_3_0 and the other Xcode_12_5_1. Make sure that, when you run the command, you also make sure you enter your app's real name. For instance:

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

An answer for us, absent-minded people.

Share:
8,230
SM_Berwari
Author by

SM_Berwari

Updated on December 25, 2022

Comments

  • SM_Berwari
    SM_Berwari over 1 year

    I have an app created with Flutter want to build it in IOS. When i want to run simulator or build the I get error ,When I run Flutter doctor I get this error L

    Xcode - develop for iOS and macOS
        ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.