Despite what you may have heard, it is possible to have multiple versions of Xcode installed at the same time without using any special tools or apps. You’ll just need to use xcode-select
on the command line to switch between them whenever you go from, for example, Xcode 9 back to Xcode 8.
- Install the latest version of Xcode from the App Store
-
Go to https://developer.apple.com/download/more to download the older version of Xcode you need and extract the archive.
-
Name the older version
Xcode 8.3.3
or whatever you like -
Drag the
Xcode 8.3.3.app
to /Applications -
Use xcode-select on the command line whenever you need to switch between versions. If builds are failing in Xcode 9, for example, due to the following:
“Error returned in reply: Connection Invalid. Software caused connection about”
There’s a simple solution — run the following in Terminal:
$ sudo xcode-select -s /Applications/Xcode.app/
Just make sure to replace
Xcode.app
with the version you want to use — perhapssudo xcode-select -s /Applications/Xcode\ 9.app/
instead.(More on this error at Stack Overflow.)
Using
xcode-select
to choose the version of Xcode you’re using also solves the following problem you may see when opening a storyboard:“An internal error occurred. Editing functionality may be limited.”
Enjoy!