Installing Xcode 4 From the App Store

I have to say, installing Xcode 4 from the Mac App Store was one of the worst software installation experiences I've ever had.

Thwarted Expectations

For starters, the big appeal to me of downloading and installing stuff from the App Store is that I don't have to manage it. All that management stuff is handled by the store itself. I make my purchase and the app installs correctly and in the proper spot. Not so with the Xcode install.

In fact, once you've clicked on the buy button in the store, had the $5 clams removed from your account and waited the half hour it takes for the 4.5 GB install to do its thing in your Dock, what you end up with is not Xcode installed on your system. No, instead what you get is an application called "Install Xcode," which is essentially just a wrapper for the old-style installer you used to get for free.

Buying from the App Store in this case doesn't seem to manage anything except Apple taking my $5 bucks, which was never a problem before because it was free. But wait, it gets worse.


So I run this installer app — this Install — and it's going okay. The inteface has the new Lion-style buttons and animations, which is at least entertaining, as well as usual stuff, license agreements and the like. Oddly, it even discovers my old install and tells me that it's going to rename it — not upgrade it, rename it — to Developer-old. No choice here, that's just what it's going to do, just so ya know.

But then it fails, and not exactly gracefully. No, it fails ugly.

Um… What now? Consult /var/log huh? This is what I paid $5 bucks for? This is what you wrote an installer app for? Crappy error reporting? So you could tell me to "consult /var/log/install.log"? Not even open Console, but consult a log file in an invisible folder? Really? You think Joe Average App Store User will have any freaking idea what this means?

And isn't this just the sort of thing the App Store is supposed to prevent?

Wherefore Failure?

So I open the lo file and this is what it says:

Mar 10 15:02:38 hassium runner[557]: Administrator authorization granted.

Mar 10 15:02:39 hassium installer[541]: Will use PK session

Mar 10 15:02:39 hassium installer[541]: Starting installation:

Mar 10 15:02:39 hassium installer[541]: Configuring volume "SysApps"

Mar 10 15:02:39 hassium installer[541]: Preparing disk for local booted install.

Mar 10 15:02:39 hassium installer[541]: Free space on "SysApps": 8.51 GB (8505917440 bytes).

Mar 10 15:02:39 hassium installer[541]: Create temporary directory "/var/folders/zz/zzzivhrRnAmviuee+++++++++++/-Tmp-//Install.541PaUH12"

Mar 10 15:02:39 hassium installer[541]: IFPKInstallElement (40 packages)

Mar 10 15:02:39 hassium installer[541]: Failed install preflight: Error Domain=NSCocoaErrorDomain Code=640 UserInfo=0x103555a90 "You can’t save the file “Developer” because the volume “SysApps” is out of space."

Mar 10 15:02:39 hassium installer[541]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.

Yup, you guessed it. Out of disk space. Now, there's a whole list of fucked-up here, so let me just take you through it.

  1. The Xcode Installer application failed because of a lack of disk space, but somehow can't just say that.
  2. The traditional, old-style (and, ahem, free) installers will simply check disk space during preflight and tell you if you don't have enough space right there in the installer, but this custom app that I paid for cannot.
  3. Nowhere on the App Store does it say that you will need 15 GBs — yes, fifteen or more gigabytes, if you count the Install Xcode app and it's payload — of free disk space to install Xcode.
  4. The Install Xcode app itself is 4.5 GBs, which is a big part of the reason my disk is too full now for the install to complete.
  5. The traditional, old-style Xcode installer always used to offer customization options so you could preen certain Developer resources from the install to conserve space. Not everyone is an iPhone developer, for instance, and not installing the iOS SDK will actually save upwards of 8 GBs of disk space. But these options are no longer present in the custom-built Install Xcode app.

The fact is, there are at least a couple points at which this problem can and should have been detected. The most logical place would be at the app store itself — preferably before I ponied up the dough — where a simple declaration of disk space requirements would be exceptionally useful, particularly for an app and installer that together take up over 15 GBs of disk space. Instead we get this, which, if anything, seems to suggest that all you'll need is 4.24 GBs of space.

It also would be lovely if the Install Xcode app could tell me all the same useful stuff as a regular installer. But then they'd have to charge $10 bucks, and who's going to pay that for something they used to get for free.

The Fix

After all this I decided to see what was inside this Install Xcode app. I presumed that there would likely be a standard PKG or MPKG file that would allow me to install Xcode in the usual manner. Sure enough, that turned out to be the case.

Running that MPKG file, by the way, did, in fact, allow my to customize my install, had I wanted to go that route. (Though I would point out, it did not seem to want to upgrade my existing components as past installations of Xcode had. Take that info for what it's worth.)

Instead, however, I decided to see things through with the Install Xcode app. So I copied it to another drive partition and erased it from my /Applications folder, which freed up enough disk space to complete the full install and ran the Install Xcode app from the secondary partition (happily, the Mac App Store still recognizes that I have installed Xcode on this system).

This time, success.



So that's my tale. In the case of Xcode, it seems clear to me that the only thing the App Store is really facilitating is payment, which was never an issue in the past because Xcode was blissfully free. Unfortunately, the overall experience of installing Xcode from the Mac App Store is more opaque and, if there is any sort of problem, far more difficult to fix. Given the lack of information provided by the App Store, it also seems far more likely that you will run into problems.

My conclusion: The Mac App Store is simply not well suited for complex application installs. It works great for drag-n-drop apps — self-contained applications that can simply be dropped into /Applications (or anywhere else for that matter). But for complex suites of applications, the Mac App Store doesn't simplify, it complicates. And that ain't right.

Finally, I don't mind that Apple is charging a small fee for the Dev tools. I always thought it was pretty generous that they were free in the past, and $5 is still cheap enough to grab them casually. What I don't particularly care for is paying five dollars for a singularly crappy installation experience. Those two things just don't mix well.


For folks just joining us in this saga, please note that there are some additional installments dealing with the recent Xcode updates, how they're handled by App Store, and how to deal with them on space-constrained drives. Installment 2 deals with some general App Store issues I had. Installment 3 deals with the 4.0.5 update, which was the smoothest — though by no means perfect — so far.

Also, one reader points out that he was able to keep his file size down but still have success with updates by simply removing the .PKG files (found inside the .MPKG mentioned above) from  Install He also points out a very cool trick that will allow you stop an in-progress update: simply option-click the INSTALL/UPGRADE button and App Store will give you the option to cancel the update. Handy!