Hello Lion, Goodbye Xcode 3Jul 20, 2011 · 4 minute read
So today was finally the day that Lion went public. I was thinking earlier in the week that I would avoid the hype, wait a few days and let everybody else find all the problems. Of course, that was never going to happen. So here is my experience of upgrading from an iOS developer perspective.
First Things First
Before attempting a major OS upgrade I first made sure I had a bootable backup of my current Snow Leopard install on an external firewire drive. I use Super Duper to create regular, bootable backups so this is no big deal. Just to be sure I kicked off an extra backup and once done did a test boot using the external drive to ensure I had an easy return path to Snow Leopard if things went badly wrong.
The Mac App Store Experience
The actual download and upgrade of Lion via the Mac App Store was a slow but painless process. It took me nearly an hour to download the over 3GB installation file. The actual upgrade process was also very slow.
For the first twenty minutes or so the installer seemed to be stuck with the estimated time remaining indicating 33 minutes. Eventually it started to move so if this happens to you don’t panic. I am not sure if it made any difference but I unplugged all my external peripherals (drives, USB devices and second monitor). Also note that once the upgrade is complete Spotlight starts indexing the files on your drive so expect it to remain sluggish until it is finished.
Overall the upgrade via the Mac App Store was a painless experience but I will feel happier when I have a Lion installer burned to a DVD for emergency use.
Now that I had Lion installed the fun really began. At this point I had three versions of Xcode installed on my system none of which actually worked with Lion. For the record the versions I had were as follows:
- Xcode 3.2.6 - installed in /Developer
- Xcode 4.0.2 - installed in /Xcode4
- Xcode 4.2 beta - installed in /Xcode42
Now as the title of this post suggests Xcode 3 is not supported on Lion so it is finally time to wave it goodbye. To be honest I have not used Xcode 3 for months so I will not miss it but if you have a reason why you need to remain with Xcode 3 you should probably avoid upgrading to Lion. On the other hand if you are still using Xcode 3 only to avoid the Xcode 4 learning curve it is time to make the switch.
At the time of writing this post the latest, released version of Xcode on the iOS Dev Center is Xcode 4.0.2 but that is a Snow Leopard only version of Xcode. For Lion you need to download Xcode 4.1 from the Mac App Store. If you try to run Xcode 4.0.2 it will complain that it requires OS X 10.6.
Xcode 4.1 is a free download and what is actually downloaded is the Xcode installer. Once the download is complete it gets added to the dock (I hate that the Mac App Store does that) but you can also find it in the Applications folder. The interesting thing to note is that it will only install to /Developer. The installer spotted that I already had an existing version of Xcode (Xcode 3.2.6) installed in /Developer which it moves to /Developer-old.
One issue I had with installing Xcode 4.1 is that it blocked at a certain point with a dialog indicating that I needed to exit iTunes. This is fairly normal for an Xcode installation and normally when you exit iTunes the installation continues. For some reason this did not seem to work this time and I had to manually kill the iTunesHelper process to get it to continue.
The other more serious problem I had was that Xcode 4.1 crashed with an internal logic error whenever I tried to run it. In some ways this is not surprising given that I had three previous versions of Xcode installed on my system. To clean things up I first uninstalled the developer tools as follows:
I then rebooted and rerun the Xcode installer (in the Applications folder) which then offered to update the development tools on my boot drive. After this Xcode 4.1 worked fine.
Since I am experimenting with the iOS 5 beta I also had the iTunes 10.5 ad Xcode 4.2 beta versions installed on my system. These are covered by the usual Apple NDA so I will just say that you also obviously need to download the latest Lion versions of these and reinstall.
After all of that I am back to having a working system. I just need to get use to scrolling in the opposite direction on my trackpad…