Apple's Xcode package contains all the tools for creating applications, tools, services, and other programs, for OS X and iOS, and has for the past few years been a free download from the Apple Developer Connection (ADC) Web site. With the debut of the Mac App Store, Apple made the Xcode package available to people without the need to sign up for an ADC account, but charges $4.99 for the download. While enticing, a few people have experienced problems with the Xcode install from the Mac App Store, with some seeing data loss and system corruption after the installation attempt.
In a slowly growing thread on the Apple Discussion boards, some people have complained that the installer for Xcode has wiped their hard drives, resulting in them needing to restore their systems from backup. Discussion board member "D.J. Glisten" describes his experiences:
Last night, I bought the $4.99 Xcode app from the App Store. Once it was done downloading, I told it to go ahead and install, and...about halfway through its install I noticed my applications were deleting one by one. Frantically, I shut my system down with a hard shut down. Upon reboot, sure enough, the HD wouldn't reboot.
Others have echoed similar experiences in their responses to the thread which, of course, would cause anyone to raise an eyebrow. Apple has not commented on the issue. Since Xcode's debut in the Mac App Store, Apple has updated the software once to address hangs and other small glitches people were experiencing during installation, but it has not directly mentioned any data-loss problems.
While this is definitely something to be concerned about, we should note that numerous people have installed Xcode without problems, or with just managing hangs during the installation. As a result, it is likely that the problem is not too widespread, but you should still take caution when considering installing Xcode and possibly try some tips to avoid potential hangs and data-loss issues:
If you tried installing Xcode from the App Store and have experienced some hangs, there is a workaround that should get the package installed. Go to the "Install Xcode" application that you downloaded from the App Store, right-click it, and choose "Show Package Contents." Then go to the "Resources" folder and you should see a file called "Xcode and iOS SDK.mpkg." Open this file, and the OS X installer will run to install Xcode, but this time it hopefully should install without any hangs.
The instances where people have experienced data loss after installing Xcode are concerning, but unfortunately for now Apple has not addressed the issue. Your best bet for avoiding the potential for this problem is to be sure you have a restorable backup of your system using Time Machine or a cloning utility, and then ensure that your system is fully updated and clear of problems before trying to install the program. Here are some things you can try before downloading Xcode to hopefully better avoid this situation:
Update the system. Run Software Update to ensure you have the latest system software and patches on your system.
Run a general maintenance routine. Follow the instructions in this article to clear your system of old temporary files.
Check for hardware problems. Boot to the OS X installation DVD and run a volume verification or fix using Disk Utility. If you have a third-party disk management tool then you can also use this.
Install in Safe Mode. You do not need to run the Xcode installer immediately after downloading it. Instead, boot your system into Safe Mode to disable all but the essential system software components, and install Xcode from there.
Install the package directly. As we mentioned above, when dealing with hanging installations, you might try avoiding the installation application itself and opening the "code and iOS SDK.mpkg" file directly, which will help by avoiding any bugs that may be in the installation wrapper application.