Eight Chapters
A few weeks ago Apple unveiled Xcode 4 to the developers who were at WWDC. The announcement of Xcode 4 makes an Xcode 3 book obsolete so I am going to focus on Xcode 4 for the next edition of Xcode Tools Sensei.
To keep the Xcode 3 material I wrote from going to waste, I am making eight chapters I wrote for an Xcode 3 version of the book available for download. There are six chapters on Xcode as well as a chapter on the OpenGL tools and a chapter on command-line debugging tools.?
You can download the chapters at the Xcode Tools Sensei site. There is a zip archive with all eight chapters available as well as the individual chapters if you don’t want all eight of them.
Xcode 3.2: Renaming Projects
Xcode 3.2 added the ability to rename projects. Choose Project > Rename Project.

Xcode is set to rename all files in the project that are based on the project name: project file, targets, build products (application name is an example), precompiled headers, and property lists. If you want to keep the old name for some files, deselect the checkbox in the left column.
Reading Third-Party Documentation in Xcode 3.2
Apple supplies documentation sets that let you read Mac OS X, iPhone, and developer tools documentation in Xcode. But you are not limited to reading Apple’s documentation in Xcode. This post shows you how to install and read third-party documentation in Xcode.
Xcode has one requirement for third-party documentation sets. The documentation set must be either an RSS or Atom feed. If you want an example of a documentation set, the cocos2D game engine has an Atom feed at the following URL:
http://aptocore.com/downloads/cocos2d/cocos2d-iphone-doc.atom
Opening Xcode’s Documentation Preferences
Open Xcode’s preferences by choosing Xcode > Preferences. Click the Documentation button in the Xcode toolbar window. The Documentation button is on the far right. You’ll have to use the scroll bar to get to it unless you have a very wide monitor. You should see the documentation sets on the left side of the documentation preferences.

Adding a Documentation Feed
Click the Add Documentation Set Publisher button. You will be asked for a feed URL. RSS feeds start with feed:// while Atom feeds start with http://. Click the OK button when you’ve finished entering the feed URL.
Installing the Documentation
After adding your documentation feed, it should appear in the list of available sets. Click the Get button to install the documentation in Xcode.
Reading the Documentation
After installing the documentation, open Xcode’s documentation window by choosing Help > Developer Documentation. Click the Home button in the documentation window toolbar. A menu with a list of installed documentation sets opens. The documentation set you installed should be one of the menu choices. Choose it to read the documentation.
Removing the Documentation
To remove documentation you installed, open Xcode’s documentation preferences. Select the documentation set from the list of available sets. Right-click and choose Reveal In Finder. Drag the documentation set to the Trash.
Xcode 3.2: New Project Assistant
Xcode 3.1 changed the way you pick a project template when creating a new project. Previous versions of Xcode had a list of all installed project templates for you to choose. Xcode 3.1 filled the left side of the New Project Assistant with project categories like Application and Framework. Selecting the category filled the top of the New Project Assistant with the project templates in that category.
Xcode 3.2 makes further changes. Suppose you’re writing a Cocoa application in Objective-C. In Xcode 3.1 you could choose from the following templates:
- Cocoa Application
- Cocoa Document-based Application
- Core Data Application
- Core Data Document-based Application
- Core Data Document-based Application with Spotlight
In Xcode 3.2, you have one template: Cocoa Application. There is an Options section with checkboxes for document-based applications, Core Data, and Spotlight importer.

The screenshot provides a hint on how to create a command-line application in Xcode 3.2. Select Command Line Tool, and the Options checkboxes are replaced by a Type pop-up menu. Use the Type menu to pick the language: C, C++, or Objective-C. Choose Foundation to write an Objective-C command-line application.
Downloading Older Versions of Xcode
Apple makes it easy to download the latest version of Xcode. But older versions of Xcode are harder to find. I’ve read many questions on Mac programming forums from people who have trouble finding older versions of Xcode on Apple’s site. Take the following steps to find older versions of Xcode:
- Go to the Apple Developer Connection site.
- If you do not have an ADC membership, click the Join Now button.
- Login to ADC with your Apple ID and password.
- Click the Downloads link.
- Click the Developer Tools link on the right side of the page.
Now you will find every version of Xcode Apple has released. Those of you running Leopard will want to download Xcode 3.1.4. Those of you running Tiger will want Xcode 2.5. Those of you running Panther will want Xcode 1.5.
Interface Builder 3.2: Outlets and Actions
In previous versions of Interface Builder, you used the identity inspector to add outlets and actions to a user interface element. Interface Builder 3.2 moved this functionality to the Library. If the Library window isn’t open, choose Tools > Library to open it. Click the Classes tab in the Library window. Select a class. Use the Outlets and Actions tabs to view, add, and remove outlets and actions for the selected class.

Xcode 3.2: Project Templates Removed
In Xcode 3.2 Apple removed all Carbon project templates as well as the Cocoa projects that used Python and Ruby. You can install Xcode 3.1 alongside 3.2 if you need the templates Apple removed. Apple doesn’t officially support Xcode 3.1 on Snow Leopard, but Xcode 3.1 can be installed and run on Snow Leopard. If Xcode 3.1 doesn’t work well for you, you can copy the project templates to the user templates location so you can use them in Xcode 3.2. Refer to this blog post from the old blog for more information on where the templates should be copied.
The PyObjC and Ruby Cocoa websites are the places to visit for the latest Python and Ruby project templates. For those of you interested in writing Cocoa applications in Ruby, Mac Ruby is another project to check out.
Xcode 3.2: Creating Java Projects
In Xcode 3.2 when you choose File > New Project, there are no Java templates in the New Project Assistant. To create Java projects you must open the organizer by choosing Window > Organizer. At the bottom of the Organizer, you will see three buttons.
![]()
Click the + button on the left and choose New From Template > Java Templates to create a Java project. Click the right button at the bottom of the Organizer to show the editor. Use the editor to write your code.
Xcode 3.2: Changing the Organization Name
In Xcode 3.2 Apple made it easier to change the organization name so the copyright notice at the top of newly created files doesn’t say __MyCompanyName__. Choose Project > Edit Project Settings and click the General tab in the inspector. At the bottom of the inspector is a text field to enter the organization name. This name will appear in the copyright notice for any new files you create for this project.

Xcode 3.2: Where Did the Build Transcript Go?
The build transcript lets you see the details of how Xcode built your project. If you upgraded to Xcode 3.2 and looked at the build results window, you noticed the group of four buttons that let you open the build transcript was missing. How do you access the build transcript?
In the build results window you should see a listing for each step in the build. At a minimum, you shoud see one listing for each source code file in your project. Selecting a listing displays the build transcript button on the right side of the window. In the screenshot below, you can see the build transcript button next to the icon saying the file GameApp.cpp has 6 warnings.

Click the button to see the build transcript.

If a step in the build process generates errors or warnings, the build transcript button appears automatically.