Skip to content
This repository has been archived by the owner. It is now read-only.
Switch branches/tags
Go to file
Cannot retrieve contributors at this time



This is a proposal for a new standard for the iOS community: a text-based file that defines the Xcode version to use to compile and package a given iOS project.

This will be used natively in with the new Xcode management feature, however it's designed in a way that any tool in the future can pick it up, no matter if it's Ruby based, Swift, JavaScript, etc..

Similar to the .ruby-version file, the .xcode-version file allows any CI system or IDE to automatically install and switch to the Xcode version needed for a given project to successfully compile your project.

Tools like xcode-install allow an automatic installation of new or old Xcode versions.

File name

The file name must always be .xcode-version

File location

The file must be located in the same directory as your Xcode project/workspace

File content

The file content must be a simple string in a text file. The file may or may not end with an empty new line, the parser is responsible for stripping out the trailing \n (if used)

Sample files

To define an official Xcode release


You can also use pre-releases using the following syntax


Note: Be aware that pre-releases will be taken down from Apple's servers, meaning that it won't allow you to have fully reproducible builds as you can't download the Xcode release once it's gone.

It is recommended to only use non-beta releases in an .xcode-version file to have fully reproducible builds that you'll be able to run in a few years also.

Comparing versions


In Ruby, comparing the file content is really easy:

Parse the version"9.2b3") # => <Gem::Version "9.2b3">


# Compare pre-releases"9.2b3") >"9.2b1") # => true

# Check if 2 versions are the same"9.2b3") =="9.2b3") # => true

# Check if public version is higher than the pre release for the same version"9.2") >"9.2b5") # => true

# Check if 10 is larger than 9"10.4.5") >"9.1.2") # => true

# Check if 8.0 is the same as 8"8.0") =="8") # => true