Developing for iPhone

Learn how to create and develop iPhone applications from scratch.

Tagged with ‘XCode’

Tutorial 1-2: Hello World!

Posted by Henry 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:

  1. Click File > New Project.
  2. 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.
  3. 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/.
  4. 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.
  5. 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!

Read the rest of this entry »

Tutorial 1-1: The SDK

Posted by Henry On April - 11 - 2009 2 COMMENTS

Mac OSX and iPhone are completely programmed in a language called Objective-C. So it makes sense that iPhone applications are too. This will be the language we will be learning from now on. We will live, breath, eat and sleep Objective-C until it is engraved onto our brains.

I don’t know enough about other programming languages to be able to compare it to anything else, so you will have to use google for that.

Where do I start?

You will need a few things before you can start making millions from that amazing application you are going to make:

  • A Mac. Surely that goes without saying. You do not need to fork out thousands to afford one, a mac-mini would be just fine for our purposes.

Oh wait. That’s it.

Read the rest of this entry »