Cover by Alasdair Allan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Creating a Project

Now let’s create our first application in Xcode. Launch Xcode by double-clicking its icon (it’s located in the /Developer/Applications folder on your hard drive). Click “Create a new Xcode project” in the Xcode welcome window, and then click Application under the iPhone OS section on the left side of the screen. Next, click the View-based Application template and click Choose. When prompted, name your new project HelloWorld. Make sure you don’t put a space between Hello and World, as this can sometimes confuse Xcode.

Note

If you don’t see a welcome window when you start up Xcode, you can create a new project by choosing FileNew Project.

Xcode will now open a project window. The left pane shows the classes and other files associated with the project, organized into groups. If you double-click on each group icon, the group will expand to show you the files it contains, as shown in Figure 3-1. The application template you choose determines how the groups are arranged, but you can move the files around and create your own groups if you prefer to organize things differently. The two main groups you’ll be working with are Classes, which contain all the classes that make up the application, and Resources, which contain other supporting files, including the .xib files that the Interface Builder application uses to describe your application’s UI. By default, the project will open to the top level of the project hierarchy, and the top-right pane will show a list of all the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required