Note: unfortunately, XcodeInstall has a transitive dependency on a gem with native extensions and this is not really fixable at this point in time. If you are installing this on a machine without a working compiler, please use these alternative instructions instead:
XcodeInstall needs environment variables with your credentials to access the Apple Developer
Center, they are stored using the credentials_manager of fastlane:
XCODE_INSTALL_USER
XCODE_INSTALL_PASSWORD
List
To list available versions:
$ xcversion list
6.0.1
6.1
6.1.1
6.2 (installed)
6.3
Already installed versions are marked with (installed).
(Use $ xcversion installed to only list installed Xcodes with their path).
To update the list of available versions, run:
$ xcversion update
Install
To install a certain version, simply:
$ xcversion install 8
########################################################### 82.1%
######################################################################## 100.0%
Please authenticate for Xcode installation...
Xcode 8
Build version 6D570
This will download and install that version of Xcode. Then you can start it from /Applications as usual.
The new version will also be automatically selected for CLI commands (see below).
GMs and beta versions
Note: GMs and beta versions usually have special names, e.g.
$ xcversion list
7 GM seed
7.1 beta
They have to be installed using the full name, e.g. xcversion install '7 GM seed'.
.xcode-version
We recommend the creation of a .xcode-version file to explicitly declare and store the Xcode version to be used by your CI environment as well as your team.
Unfortunately, the installation size of Xcodes downloaded will be bigger than when downloading via the Mac App Store, see #10 and feel free to dupe the radar.
请发表评论