110

As Xcode 8 beta is available to download, I see it's distributed with a .xip extension, Xcode_8_beta.xip.

What is the .xip format? What's the difference between previous .dmg format?

  • So, how you install that file Sir? I am downloading this file now.. – toha Oct 5 '16 at 6:59
132

According to the xip manual page:

A XIP file is an analog to zip(1), but allows for a digital signature to be applied and verified on the receiving system, before the archive is expanded. When a XIP file is opened (by double-clicking), Archive Utility will automatically expand it (but only if the digital signature is intact).

Essentially, an .xip file is just a .zip with a signature to verify that the file has not changed since its creator saved it. This protects from both damage from a disk error and from a third-party tampering with the file.

45

The .xip file format contains an archive (xar containing a gzip archive and metadata) and a signature of the archive.

To decode an .xip file, use the following commands:

pkgutil --check-signature <xip-file>
xar -xf <xip-file>
tar -zxvf <xar-file>

See the following links where developers discuss this format and its implications:

Not for Public Use

Apple has since removed xip from public use. The format has been reserved for Apple's exclusive use in the future, see TN2206:

Important: Starting with macOS Sierra, only XIP archives signed by Apple will be expanded. Developers who have been using XIP archives will need to move to using signed installer packages or disk images.

  • 1
    That didn't work for me for Xcode_8_GM_seed.xip. After using xar, I was left with what appears to be a pbzx file instead of a gzip archive. – zeroimpl Sep 10 '16 at 21:01
  • 1
    xar -xf Xcode_8.xip has produced zero files under 10.11.4 – Anton Tropashko Sep 19 '16 at 6:55
  • 1
    If the xip can be expanded, the files will be in the same folder as the original. According to @AntonTropashko it is likely no files will be produced. – Graham Miln Oct 22 '16 at 13:15
  • 1
    It sure looks like XIP files are varying by date produced, I was able to get a "Contents" and "Metadata" file extracted, with Contents having seemingly raw data that wasn't xz compressed. – Spotlight Jul 15 '17 at 10:40
  • 2
    My first guess would be that the contents of the Metadata file indicates the compression used for the raw data. Given Apple have re-appropriated the format for private use, they are able to change it without public documentation. – Graham Miln Jul 15 '17 at 12:44
3

To my knowledge xip is a xar derivative using gzip compression, with a toc header xml containing checksum, timestamp, certificates, user id/name, creation/modification/access date&time etc.

1

The Unarchiver and command line (xar, tar) utilities didn't work for me on MacOS 10.12.6. What did work was right clicking on the .xip file and select "Archive Utility", it was able to expand the .xip file successfully.

enter image description here

  • 1
    Were you able to install xcode using the .xip file? – Ahmed Anwar Oct 3 '18 at 16:01
  • Yes, double clicking on the .xip file extracts the XCode application. It doesn't copy it to the Applications folder so you will have to do that part yourself. – mbonness Oct 3 '18 at 16:21

You must log in to answer this question.

protected by Community Jan 22 at 20:09

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .