Xcode installation from xip file

By | August 20, 2019

It is not possible to know everything, but it is quite accessible to learn something new everyday. Recently I decided to upgrade my Xcode on my Mac laptop, I sent installed Xcode into trash. I went to Apple Store to download a new one and found that there is no Xcode dmg files, but Xcode xip files instead. In that moment I had no idea what xip files were, but currently I know. An xip file is analog of zip file which can be digitally signed for integrity. In the same time xip is the name of Mac OS X tool, which can be used to create or extract a digitally signed xip archives:


# xip
Usage: xip [options] –sign [ … ]
Usage: xip --expand

So currently Apple Store does present different versions of Xcode in xip format:
Xcode.xip

How to install Xcode from xip file? First download Xcode xip file, the file size is several Gigabytes so it may take a few minutes. When download is completed, copy xip file to /Applications directory, otherwise Xcode will be installed in the directory, where Xcode xip file is located. It is not big deal to have Xcode in different directory than /Application/Xcode.app, but you need to specify different Xcode.app active developer directory after installation using xcode-select tool, for example:


# sudo xcode-select --switch /Users/someuser/Downloads/Xcode.app/Contents/Developer

There are two ways to install Xcode from GUI interface just double click on Xcode xip file or form terminal using xip tool, first copy downloaded Xcode xip file into /Applications directory:


# cd /Applications
# xip --expand Xcode_10.2.1.xip
xip: signing certificate was "Software Update" (validation not attempted)
xip: expanded items from "/Applications/Xcode_10.2.1.xip"
# ls -l
total 11855872
drwxr-xr-x 3 root wheel 96 Apr 5 20:33 Xcode.app
-rw-r–r–@ 1 root staff 6055660727 Aug 16 11:04 Xcode_10.2.1.xip
# xcode-select -p
/Applications/Xcode.app/Contents/Developer

When installation is completed delete Xcode xip file:


# rm Xcode_10.1.xip

To install command line developer tools (g++, lldb, swift) run the following command from terminal:


# sudo xcode-select --install

Command line developer tools

4 thoughts on “Xcode installation from xip file

  1. Svetlana

    xip -x ~/Desktop/Xcode_9.2.xip
    xip: signing certificate was “Software Update” (validation not attempted)
    xip: error: The archive “Xcode_9.2.xip” does not come from Apple.
    I have an error!

    Reply
  2. AG

    Don’t forget to make sure you ‘sudo xcodebuild -license accept’ after the xcode-select -p
    coomand.

    Reply

Leave a Reply

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