Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Doctor : Xcode installation is incomplete

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.
like image 846
SM_Berwari Avatar asked Nov 21 '20 14:11

SM_Berwari


4 Answers

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

like image 57
Amit Baderia Avatar answered Oct 10 '22 02:10

Amit Baderia


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.

like image 26
Iván Yoed Avatar answered Oct 10 '22 01:10

Iván Yoed


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

like image 38
SilenceCodder Avatar answered Oct 10 '22 01:10

SilenceCodder


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

like image 10
BLKKKBVSIK Avatar answered Oct 10 '22 00:10

BLKKKBVSIK