Creating Your Hello World Application
Power up Xcode (type "Xcode" in Spotlight to quickly launch Xcode) and you should see the welcome screen.
To create a new iPhone project, select File→New Project. Figure 1 shows the different types of projects you can create using Xcode. There are two primary categories: iPhone OS applications and Mac OS X applications. For this article, you are obviously only interested in iPhone applications. Click the Application item listed under iPhone OS to view the different templates available for developing your iPhone application.
Suffice it to say at this point, that there are quite a few types of iPhone applications you can create; select the View-Based Application template and click Choose.
Figure 1. Create a New Project: These are the different types of iPhone application templates.
Figure 2. Files and Folders: Here are the files and resources in your iPhone application project.
Name the project HelloDevX and click Save. Xcode will proceed to create the project for the template you have selected. Figure 2 shows the various files and folders in your project.
|Figure 3. Customize the Toolbar: This shows the Active Target item added to the toolbar.|
Xcode's left panel shows the groupings in your project. You can expand each group to reveal the files contained in each group (and in the folders). The right panel shows the files contained within the group (or folder) you have selected in the left panel. To edit a particular file, select the file and the editor at the bottom of the right panel will open up the file for editing. If you want a separate window for editing, simply double-click on a file to edit it in a new window.
The top part is the toolbar area. This area contains all the commonly used toolbar menu items you'll use in the development process. You can customize the toolbar area to add your commonly used items. Give this a try by selecting View→Customize Toolbar. A drop-down window will appear.
To add an item to the toolbar, simply drag and drop the item onto the toolbar. Figure 3 shows the Active SDK item added to the toolbar.
The Active SDK item allows you to select whether to deploy your application to a real device or the Simulator.