Filed under: TUAW Tips, Developer
Xcode 3.2 Daily Tip: Upgrading Xcode
For those about to code, we salute you. Developers: are you ready to upgrade your new Snow Leopard install to Xcode 3.2? The Xcode installer package appears in your Snow Leopard disc's Optional Installs folder. Double-click the mpkg file to open the installer and begin the installation process.
Xcode 3.2 offers a number of really great new features, several of which will be highlighted in upcoming daily tips. Standouts include the new built-in static code analysis, the two new LLVM compiler front ends (GCC 4.2 and Clang), and the new Build Results window.
Until you install, you may run into problems using the standard C compiler from the command line. (It threw errors about not finding <stdio.h>, etc.) This despite the fact that I had already re-installed the iPhone SDK.
Once I upgraded to the new Xcode, and rebooted, the command line cc started working again. The reboot step seemed necessary because cc didn't work until I did so. There might have been a less extreme alternative I'm not aware of to use instead. (If you know of one, please let me know in the comments!)
You'll need to re-install your iPhone SDK packages as well. Make sure you download the SDK versions that were built specifically for Snow Leopard. The iPhone Dev Center provides both Leopard and Snow Leopard SDKs for each of its standard and beta distributions. Install these packages after upgrading to Xcode 3.2. I did not and ran into trouble with project creation (as well as the already mentioned command line cc) until I finally got the install order corrected.
Update: Remember, the iPhone SDK packages do not include Xcode 3.2, so just downloading the iPhone SDK for Snow Leopard will not upgrade Xcode.
Thanks go to hatfinch for his help.

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Jesse said 7:16PM on 9-03-2009
Xcode is shaping up quite nicely. Hopefully as clang matures they fully integrate that into Xcode to provide live feedback about syntax errors and the like while typing. The static analyzer is a busy programmers dream come true.
GCD + OpenCL + Xcode 3.x + clang + LLVM = mac developer heaven?
Reply
Quinn Taylor said 11:50PM on 9-03-2009
Agreed, I am totally hyped about the possibilities for smooth IDE integration with Clang and LLVM. Real-time feedback is just one of them, and will bring Xcode that much closer to matching all the good things about Eclipse, while (hopefully) continuing to dodge or amend the bad parts. (Xcode already does predictive compiling, but GCC was never designed for providing live error and warning feedback, and is GPL'd to boot, so it has been near impossible for Xcode to display before compiling.) There are still features from other leading IDEs that I'd like to see, but the pool of those is rapidly diminishing.
Pooria said 7:19PM on 9-03-2009
Hey!
I'm downloading "iPhone SDK 3.0 leopard 9m2736 final" right now.
ca I use this iPhone SDK with Xcode 3.2 on SnowLeopard?? I have a slow connection and I don't want to waste my time downloading something that doesn't work on SL ...
thanx.
Reply
Hobbes said 7:55PM on 9-03-2009
Then stop your download now and get the Snow Leopard version. There is a Leopard and a Snow Leopard iPhone SDK. Make sure you get the Snow Leopard one.
dagamer43 said 10:42PM on 9-03-2009
Also, you must install XCode from your Snow Leopard disk before the iPhone SDK will work. It doesn't include an install for XCode yet.
me said 11:09PM on 9-03-2009
Is SL smart enough to detect that an existing SDK? I'm trying iPhone dev out, and I'm not sure if I have to remove the old stuff.
Reply
thezonie said 11:33PM on 9-03-2009
I currently have the iPhone SDK 3.0 installed in /Developer and the iPhone SDK 3.1 Beta 2 in /DeveloperBETA ... (The way I understood it was you had to install them separately to still build and submit iPhone applications with 3.0)
Does this mean I will need to install Xcode 3.2 twice, (once in /Developer and once in /DeveloperBETA) and then re-download and install the 3.0 and 3.1b2 Snow Leopard iPhone SDKs in their appropriate folders?
Reply
stevevrporter said 12:52AM on 9-04-2009
I performed the upgrade as directed, but I'm able to consistently lock up Xcode while running iPhone unit tests.
Easy for me to reproduce, start a new iPhone project, follow the steps in the developer guide to add a new unit test, build, hang...
Anyone else have this happening to them?
Ta.
Steve Porter
Reply
Aaron Douglas said 8:44PM on 9-07-2009
I'm having the same problem - I've reinstalled the SDK, tried cleaning the targets, etc. You're the first person that is running into the same problem!
I upgraded from Leopard to Snow Leopard, installed Xcode 3.2 and then installed the Snow Leopard SDK. The project was originally created in 3.1 but I am following the procedure in the unit testing section like yourself.
stevevrporter said 8:47PM on 9-07-2009
And to make things even stranger, the google-toolbox-for-mac unit testing SDK works like a charm... Weird.
Ta.
Steve Porter
Aaron Douglas said 8:31PM on 9-09-2009
And sadly, iPhone SDK 3.1 doesn't fix any of the problems with Xcode either. Guess I need to file a bug report with Apple!
Aaron Douglas said 9:20PM on 9-09-2009
By the way I filed a bug report with Apple regarding this - ID #7210948.
Zer0mac said 10:17AM on 9-04-2009
Maybe CC does not work before reboot beacuse macosx lacks ldconfig (thus is not needed because the system uses a different approach on installing using and removing apps than other unixes) on reboot the shared library cache flushes and there you have it the new libdeps just come up on reboot. it's just a humble guess ;) but could explain your problems with CC before reboot.
Reply