Command-line tools are used by Flutter to build your apps without needing to open Xcode. They are an extra add-on that requires your primary installation of Xcode to be complete:
- Verify that Xcode has finished downloading and has been installed correctly. After it is done, open the application to allow Xcode to fully configure itself. Once you see the Welcome to Xcode screen appear, you can close the application:
- Type this command in the Terminal window to install the command-line tools:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
- You may also need to accept the Xcode license agreement. Flutter Doctor will let you know if this step is required. You can either open Xcode and will be prompted to accept the agreement on the first launch or you can accept it via the command line, with the following command:
sudo xcodebuild -license accept