Tutorial 1-2: Hello World!
On April - 12 - 2009 2 COMMENTS
Ok, you should now have installed the iPhone SDK on your mac. If you haven’t, follow the instructions in tutorial 1-1.
We will be using an application called XCode to build our applications, so fire it up now. (You can find it in the directory you installed the SDK to, if you can’t find it, use the search feature in the top-right corner of the screen.) Upon opening XCode, you should be presented with a splash screen welcoming you to XCode. Close this (and uncheck “show at launch” if you don’t want to see it again). Now follow these instructions to get started:
- Click File > New Project.
- In the left pane of the new window, choose Command Line Utility and then select Foundation Tool in the right pane. Now click the Choose button at the bottom of the window.
- You will now be asked to create a project file. This is where all the files you use in this project will be stored. Save it as “Hello World” in a folder you will remember. I saved mine in User/Documents/iPhoneDev/.
- You should now see the project window which is split into 3 parts. The pane on the left is used to organize and group all your project files, the top-right pane is for viewing all the files in a particular folder, and the bottom-right pane is used to preview a file’s contents. For now we only want to see any code documents, so click the Source folder in the left-pane.
- You should now see two files in the right pane. “Hello World.m” and “Hello World_Prefix.pch”.
Great! All set up and ready to start coding!