Unable to update to Xcode 4.0.2 from Mac AppStore

I am currently developing an iPhone App called MoneyStats and this one will be my first app to be submitted to the AppStore. Since I am developing for iOS in my free time, progress takes a while. Therefore I am waiting for the App to be in a state which makes sense to submit to the AppStore before I subscribe for the Apple Developer Program.

XcodeSo my only way to get hands on Xcode 4 is to buy it from the Mac AppStore. That is where my problems started. When trying to update to Xcode 4.0.2, the AppStore always stated “Ihr Kauf konnte nicht abgeschlossen werden – Xcode is already installed on this computer. Choose Software Update from the Apple menu to check for available updates.” Yes actually this was a mixup of languages, basically the german part means “Your transaction could not be finished […]“.

After deleting the “Install Xcode” Application from my mac and completely uninstalling Xcode by calling

$ sudo /Developer/Library/uninstall-devtools -mode=all

in the Console, the problem still persisted. As all my efforts could not solve the problem, I was not very eager to contact Apple’s support as of my earlier experience with the so-called “support” other companies offer. Well, however, as it is with support, you first have to do the basic stuff, even if you already did it many times. So the standard tasks had to be done againlike

  • read Apple’s support pages
  • delete the misfunctional app from the Programs folder
  • restart your computer (a classic one)

but none worked. Well, after almost giving up and waiting for a response from the support, I accidentally came across the solution when I set up my brand new QNap-NAS:

I found a backup copy of the Application “Install Xcode” in one of my document folders and then it struck me like thunder. Even though this files was not link either by a symbolic link or a hard link in the Applications folder, this was the reason why the update did not work. It seems as the AppStore does not only look in the Applications folder for installed apps at least when updating, but also on other folders – at least it found it in my personal folder.

After deleting the file everything worked fine. I could update, download and install the new version without issues!

I have to say one last word about Apple’s support. They actually did not really help me and I forgot to tell them that my problem was solved, but I appreciated it very much when one of the support staff asked about the status of my ticket and if it still persistet. I know support staff from other companies who do not even pretend to be interested in a solution to my problems.