Lukas Pistrol Logo

Lukas Pistrol

Xcodes: The best way to install Xcode

Installing Xcode on macOS is pretty straight forward. Just open the App Store, search for Xcode and click install. It will download the latest version of Xcode and install it on your Mac. There are, however, a couple of downsides to this approach:

First of all it is pretty slow. While it has improved over the last couple of years, Xcode is a pretty huge app and downloading it through the App Store can take a while.

Secondly you can only have one version of Xcode installed at a time. Also beta versions of Xcode are not available through the App Store. But it also means that you can't go back to a previous version of Xcode if you need to for some reason (which happens from time to time).

Another approach is to download Xcode directly from the Apple Developer Portal. This not only allows you to download beta versions of Xcode, but you can also download previous versions of Xcode. One downside is that you won't get easy updates for Xcode. You will have to download and install them manually.

There surely has to be a better way to install Xcode, right? Well, there is.

Entering Xcodes

Xcodes comes both as a command line tool as well as a GUI app for those who prefer the more visual approach. It basically is a manager for Xcode installs. It at a glance shows you which versions of Xcode are available and which are installed on your Mac. You can obviously install multiple versions of Xcode and switch between them with ease.

But there is more. While downloads from the App Store as well as the Developer Portal usually use a single connection to download the file, Xcodes utilizes aria2 to establish multiple connections to the server to download the file in parallel. This can and will significantly improve download speed provided that your internet connection is fast enough.

But it doesn't stop there. You can also enable experimental unxip which uses a faster method to extract and validate the downloaded Xcode archive.

Installing Xcodes

Installing Xcodes is pretty straight forward. You can either download the latest version from the releases page or what I recommend, install it using homebrew:

brew install xcodesorg/made/xcodes # for the command line tool
brew install --cask xcodes # for the GUI app

I also suggest to install aria2 as well to automatically enable parallelized connections (up to 16): brew install aria2

Using Xcodes (CLI)

To see all possible actions available in Xcodes you can run xcodes --help:

$ xcodes --help
OVERVIEW: Manage the Xcodes installed on your Mac

USAGE: xcodes <subcommand>

OPTIONS:
  -h, --help              Show help information.

SUBCOMMANDS:
  download                Download a specific version of Xcode
  install                 Download and install a specific version of Xcode
  installed               List the versions of Xcode that are installed
  list                    List all versions of Xcode that are available to install
  runtimes                List all simulator runtimes that are available to install
  select                  Change the selected Xcode
  uninstall               Uninstall a version of Xcode
  update                  Update the list of available versions of Xcode
  version                 Print the version number of xcodes itself
  signout                 Clears the stored username and password

  See 'xcodes help <subcommand>' for detailed help.

Downloading Xcode

Downloading is pretty straight forward. But you can also specify a couple of options to customize the download:

xcodes install --latest # download the latest version of Xcode
xocdes install --latest-prerelease # download the latest beta version of Xcode
xcodes install 15.0.1 # download a specific version of Xcode

To speed up the installation even further you can enable the experimental unxip feature:

xcodes install 15.0.1 --experimental-unxip

You will then be prompted to enter your Apple ID credentials. This is necessary to download Xcode from the Apple Developer Portal. The credentials will be stored in the macOS keychain for future use.

Switching between Xcode versions

To switch between Xcode versions you can use the select command:

xcodes select 15.0.1
xcodes select 15.1\ Beta\ 2

Using Xcodes (GUI)

The GUI app is pretty much self explanatory. But before you start installing Xcode you should go to the settings and enable experimental unxip to speed up the installation process.

Xcodes GUI Settings

Then you can choose a version of Xcode to install from the list of available versions:

Xcodes GUI List

You will need to enter your Apple ID credentials to download Xcode from the Apple Developer Portal. The credentials will be stored in the macOS keychain for future use.

Xcodes GUI Login

Conclusion

Xcodes is a great tool to manage your Xcode installs. It is especially useful if you need to install multiple versions of Xcode or if you want to download beta versions of Xcode. But even if you only need to install the latest version of Xcode, Xcodes can speed up the installation process significantly. I highly recommend to give it a try.

Do you use Xcodes? What is your preferred way to install Xcode? Let me know on X (formerly Twitter).

Another article you might like: