Chapter 6. Xcode

Apple likes to refer to Xcode as “the hub of your development experience.” Technically, Xcode is a suite of developer tools designed to help developers write Cocoa applications. Most Cocoa developers spend their time in the Xcode IDE.

Xcode IDE

You don’t need to use an IDE to write Cocoa apps. But you will more than likely want to use the tools in place to streamline development and avoid doing a lot of things manually. As of the writing of this chapter, Xcode doesn’t support MacRuby as well as it supports Objective-C, but the key features are supported: MacRuby templates, schemes, and the integration with the Interface Builder suite.

To get acquainted with Xcode, you have the choice of starting a new project or opening an existing one. At this point, I will assume you have never used Xcode and you want to start a new MacRuby project.

Template

Xcode 4 template chooser

Figure 6-1. Xcode 4 template chooser

Start Xcode, click on Create a new Xcode project, select Application under Mac OS X, choose MacRuby Application (Figure 6-1), and click the Next button.

You will then be offered a few options, as shown in Figure 6-2:

Xcode MacRuby application template option chooser

Figure 6-2. Xcode MacRuby application template option chooser

Product Name

The unique name of your application.

Company Identifier

Your company ID using the reverse domain notation. This starts ...

Get MacRuby: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.