Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

toru173

macrumors 6502
Original poster
Apr 5, 2007
318
137
Hi Team,

Another idea/snippet I thought I'd post because it seems to be an ongoing issue for small capacity devices. The issue encountered is that Xcode is downloadable from Apple's Developer Portal (https://developer.apple.com/download/all/?q=xcode); however, it is an extremely large xip file archive, approximately 12GB in size. The archive request 32GB of free space in order to extract the app even though the final file size is smaller than this. Editing the Metadata file contained within the Xip archive to request less space results in a failed signature check (as expected). Thus, the easiest thing to do is to move the file off the main disk and extract it, then move the extracted files back. One way to do this - provided there is sufficient RAM - is to copy the installer to a 12GB RAM disk and then extract it to /Applications. Note that the xip utility extracts the file to the current working directory. Thus, we can do the following:

Code:
hdiutil attach -nobrowse -nomount ram://25165824
diskutil erasevolume HFS+ 'RAM Disk' /dev/diskX
mv ~/Downloads/Xcode_VERSION.xip /Volumes/RAM\ Disk/
cd /Applications
xip --expand /Volumes/RAM\ Disk/Xcode_VERSION.xip
hdiutil eject /dev/diskX

I wanted to drop this here as I didn't see this solution mentioned anywhere else, and I've also posted it as a Gist (https://gist.github.com/toru173/3e9837196235f28fd17cbd81255740b8)

Now, off to resume my coding adventures!
 
  • Like
Reactions: excelsior.ink
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.