How do I install xCode command line tools? How to install Xcode 9 beta along with xCode 8?

Evan Conrad picture Evan Conrad · Jul 2, 2016 · Viewed 22.1k times · Source

Are the tools available? I have an apple developer account and I have Xcode 9 beta downloaded which I got from https://developer.apple.com/download/.

Are Xcode 9 developer tools out?

Answer

Dershowitz123 picture Dershowitz123 · Jul 2, 2016

When you install Xcode, you'll install command line tools too. You can verify by typing $ gcc. If you get an error like:clang: error: no input files, you already have command line tools. But just for info, you can do $ xcode-select --install if you want the command line tools.

Now to use both Xcode8 and Xcode9 Beta together, you need to do the following:

0) Close all open Xcode projects and quit Xcode

1) Rename your Xcode (8 which will be just Xcode.app in your /Applications directory) to something like Xcode8 .

2) Type in $ xattr -d com.apple.quarantine /Users/<your_user_name>/<the downloaded directory>/Xcode-beta.app. Here you need to drag your xcode-beta(xcode9) to your terminal once you just type $ xattr -d com.apple.quarantine. Now, move your Xcode-beta into your /Applications directory and rename it as Xcode .

3) Type in $ sudo xcode-select -s /Applications/Xcode(which is 9 now).app/Contents/Developer . If you want to switch back to 8, just type in the same command with Xcode8.app in the place of Xcode.app.

4) Verify you're using Xcode 9 by typing $ xcode-select -print-path. You can see that it'll point to Xcode.app which actually is Xcode-beta, i.e., Xcode 9.
Xcode-beta is xcode 9.