Install Missing Command-Line Tools in 4.3
The Xcode command-line tools are no longer installed by default as of Xcode 4.3. Instead, you’ll need to install them in Xcode’s Downloads preference pane. Choose Xcode > Preferences from the main menu and select the Downloads tab. Under the Components sub-tab, click the Install button next to the “Command Line Tools” entry in the table. They’re roughly 170 MB in size so sit tight while they download and install.
Thanks to Zach Holman ( @holman ) for the following tip: If you want to install the command-line tools without installing Xcode, you can simply download only the tools themselves.
Open Developer Tool vs. Dock Shortcuts
Looking for a less awkward way to open the other developer tools (like Instruments, Icon Composer, etc.) than Xcode’s Open Developer Tool menu? How about the more familiar Dock shortcuts? Here’s how.
Xcode 4.2 is now a self-contained app installed in the Applications folder. All the additional developer tools are inside the Xcode bundle under /Applications/Xcode/Contents/Applications. You could launch each one and reposition their icons on the Dock so they stay put or right-click the dock icon, and choose Options > Keep in Dock from the context menu. Alternatively, you could right-click the Xcode icon in the Applications folder and choose Show Package Contents, open ../Contents/Applications, then drag the desired apps to the Dock.
That’s it! Happy coding!
Installing Xcode 4.3
Xcode 4.3 was released today via the Mac App Store. The biggest change is that it is now installed as a normal app, versus an installer. This is so that it can be updated via the MAS like any other app. The important fact to note is that 4.3 is installed in your /Applications folder, no longer the /Developer folder. This leaves Xcode 4.2 and all its associated cruft behind. Your dock icon will still point to version 4.2. You’ll probably want to uninstall it when you upgrade to 4.3.
Uninstalling Xcode 4.2
Update: This section is not necessary. Skip to the next section!
I did not uninstall 4.2 before installing 4.3. When I realized 4.2 was still around, I used the uninstall script to remove it with no ill affects to 4.3. It looks like Xcode 4.3 is very well self-contained.
To uninstall, Xcode 4.2 make sure you’ve quit Xcode. Open the Terminal app and issue the following command:
sudo /Developer/Library/uninstall-devtools –mode=all
Give it your password and let it run. It tells you to reboot if you’re installing older tools, but I did not do this. Everything seems to work just fine. You may have to clean up by removing the worldly remains of the /Developer folder yourself.
Replace the 4.2 dock shortcut with 4.3 and launch.
First Launch
You’ll be asked to agree to the EULA, then to install additional components. You’ll also be asked if you want to uninstall old Xcode tools (including version 4.2 – so the way I upgraded/uninstalled in the section above this one was the long way around). Once that’s done, click Start Using Xcode. Most everything looks exactly the same.
What About The Other Tools?
This leaves a glaring question: how do you access Instruments, Icon Composer, etc.? Well it’s a bit awkward, they’re accessible via the Xcode application menu. Choose Xcode > Open Developer Tool from the main menu for a list of tools to open. Here’s a tip to make this easier.
Performance Tip
I came across a post by Gregory Meach claiming to speed up a slow Xcode 4 project. It seems the workspace (project.xcworkspace) file inside your project bundle (MyApp.xcodeproj) can be a source of not only slow performance but outright beachballing for minutes at a time. Mr. Meach claims deleting the file can cure this.
Handling False Positives with the Static Analyzer
The Clang static analyzer is an amazing tool but it doesn’t always get things right. Sometimes it gets things exactly right but we’re engaging in unsavory behavior because we have no alternative. Either way, the analyzer points an accusing finger and finds your code … lacking.
Unresponsive SCM Host
While finishing the SCM chapter – or trying, anyway – I couldn’t figure out why Xcode reported the host of my test repositories as reachable but would seem to be unresponsive otherwise. Turns out it was a simple SSH issue.
Xcode 4 Documentation Download Problems
A number of Xcode 4 users (myself included) have experienced a problem where Xcode keeps repeatedly prompts for a password to download the documentation sets some time after launch. This happens whether we’ve verified the latest docs are in fact installed (or the documentation in fact is never installed). Here’s how I fixed this issue for me.
Interface Builder Plugins Update
Xcode 4.1 brings a slight improvement to the horrifying news that Interface Builder Plugin (IBPlugin) support was dropped in 4.0.
Making an iOS Target Universal
Back in April, I posted a tip about how to transition an iPhone target to iPad. It was pointed out to me recently that it’s just as easy to transition an iPhone or iPad target to a universal iOS target.
Providing Your Own Quick Help
Xcode’s documentation integration is a useful tool. Its Quick Help feature (the option-click bubble and the Utilities panel) relies on “documentation sets” to provide contextual descriptions of symbols within an API. You’re not limited to Apple’s documentation, however. You can add your own.

