Categories
Mac OS

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 Xcode.app rename to Xcode-11.5.app ,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:


of course,This tool uses curl to download,In fact, there is no special optimization for delay waiting time,If you download it easily with a browser,The same is true with this tool,Only version management is more convenient...

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:https://www.logcg.com/archives/3377.html

By R0uter's Blog

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 *