How to manage Xcode versions the easy way
No more hair pulling!
2 min read
Apple's Xcode helps building a lot of great iOS apps. However, working with Xcode is a real pain in the rear, due to the breaking changes; the code signing process; the upgrade/downgrade to specific versions, etc.
Having multiple versions of Xcode in your single machine provides more flexibility. It’s a good practice to try and stay up-to-date, but sometimes you need the ability to release an app built with an older version. Previously, my best approach was to download specific versions of Xcode manually (using either xcodereleases.com or this great SO answer) rather than using the Mac App Store version. This approach has some downsides:
- Two many manually steps involved (download, extract, install, verify, rename, select the version for CLI, etc)
- Sometimes the downloads just get interrupted for no reasons
Recently I found this great tool called Xcodes (great naming btw) that provides us a much better way to install and switch between multiple versions of Xcode.
Xcodes offers these great features:
- List all available Xcode versions from xcodereleases.com's data or the Apple Developer website
- Install any Xcode version, fully automated from start to finish. Xcodes uses aria2, which uses up to 16 connections to download 3-5x faster than URLSession
- Just click a button to make a version active with
- View release notes, OS compatibility, included SDKs and compilers from xcodereleases.com
To install Xcodes using
brew install --cask xcodes
In your first time opening Xcodes, it will prompt you to sign in with your Apple Developer account.
After that, click
Install on the Xcode versions you want to download. Xcodes will do all these jobs automatically:
- Moving the Xcode version to the specified directory (if you manually set it)
- Trashing the archive
- Checking security assessment and code signing
After the installation is done, to active a specific version, just select that version and click the
Active button. That's it!
Hopefully this tool will make your life as an iOS developer much easier. If you're looking for a command-line version of Xcodes, check out xcodes.