Use xcode-install to manage Xcode versions

we all know,There is pyenv when using Python,If you use ruby, there is rbenv,Can easily control and manage the version of the programming language environment,Then,Is there any way,Can Xcode switch versions like this?

Every time Xcode releases an update,More or not has become a problem,Difficult to download,Can't resume,Can't use third-party tools to download,It's really terrible... not to mention the compatibility issue when multiple versions。

use xcode-install,Solve these problems at once,Yay!

It is a tool specifically for managing Xcode versions,You can switch between different versions of Xcode with one click,Install multiple versions of Xcode on your Mac,Very convenient。

First of all,Use the command to install it: gem install xcode-install

Then update the list of available versions: xcversion update ,However, because it is to pull the list of all available versions from the Apple developer website,So you need your developer login account and password,These will be saved in the local iCloud keychain,do not worry。

After entering, you are likely to encounter the following error:

This is due to you currently have Xcode installed,This prevents xcode-install from creating links,So,Based on your currently installed Xcode version,Rename the currently installed version,For example, the version I have installed is the latest 11.5,Then put rename to ,Then try again。

After updating the list, you can install according to the version number in the list,you can see,In the version list,11.5 Version is already installed:

Just use the command xcversion select 11.5 Make the current Xcode effective。

use xcversion selected To verify:

Now xcode-install can correctly identify the version of Xcode that we originally installed and are using。

Note that if the version number contains spaces,Such as beta,Then you need to enclose the version number in single quotes,Use command to install another version of Xcode:

Frequently broken during downloading,it's OK,You can rerun the installation command,It is cached,So it can resume uploading,For friends with poor network quality,Really comforting。

Original article written by Gerber drop-off:R0uter's Blog » Use xcode-install to manage Xcode versions

Reproduced Please keep the source and description link:

About the Author


The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Leave a Reply

Your email address will not be published. Required fields are marked *