Introduction:

Many peoples start working with iPhone without knowing many things about it and later they find it difficult to get everything on board. So this tutorial is focused on getting "Hello World" application running on iPhone simulator.

10 Steps to create your hello world iPhone tutorial

You need following things before you start developing your hello world application in simulator:

  1. A MAC machine
    • Specification of that machine is, it should have Intel processor with 10.5.7 or latest Leopard installed.
  2. Apple Developer Account ( which is free for everyone , you can register your self here)

To get start with iPhone development you need to have iPhone SDK . To test the code on your device (iPhone) you need to buy a developer license which cost you 99$ or 299$ for enterprise.

You have to follow these steps to get your first hello world application running on iPhone simulator. So this is your first hello world iPhone tutorial to get everything on your machine before you start developing big iPhone applications.

Step 1: After downloading the sdk and updating your mac os x to 10.5.7 leopard or above, you can install the sdk. If your mac is not updated to 10.5.7 at-least, you can install the xcode but not iphone development kit. (Look at 3rd picture, iPhone SDK check box should be enabled and bold)

Picture 7 Getting Started with iPhone Development 
Downloaded iPhone SDK 2.2.1

Picture 8 Getting Started with iPhone Development 
Installing iPhone SDK 2.2.1

Picture 9 Getting Started with iPhone Development 
Verifying iPhone SDK installation

Step 2: After installing the xcode please open "Macintosh HD" (finder) and then go to >Developer>Application>Xcode. Lunch it

Picture 10 Getting Started with iPhone Development 
Run Xcode after iPhone SDK installation

Step 3: To Start a new project in Xcode, click on Xcode from dock and select File>New Project.

Picture 1 Getting Started with iPhone Development 
Creating your first iPhone Application

Step 4: Select "View-Based Application" and click 'Choose'. Name it HelloWorld and click finish.

Picture 3 Getting Started with iPhone Development 
Selecting right chose for your first iPhone application

Picture 4 Getting Started with iPhone Development
Give name to your iPhone application

Step 5: Click on "build and go", it will launch the iphone simulator and you will see a gray window.

Picture 5 Getting Started with iPhone Development 
First View of your files created by SDK

Picture 6 Getting Started with iPhone Development 
Build and GO button in iPhone SDK
Picture 12 Getting Started with iPhone Development 
Output of your hello world iPhone application

Step 6: Press the home button and you will see a white icon for hello world.

Picture 13 Getting Started with iPhone Development 
Home button in iPhone Simulator

Picture 14 Getting Started with iPhone Development 
Hello world iPhone application icon

Step 7: Open Xcode again and expend nib files inside Xcode Group and Files. Open the HelloWorldViewController.xib file.

Picture 15 Getting Started with iPhone Development 
Selecting nib (xib) file inside Xcode

Step 8: In interface build, Select View file and press cmd + 1 ( or click on Tools and select inspector) and change the background color to red.

Picture 16 Getting Started with iPhone Development 
Selecting view from Interface builder

Picture 17 Getting Started with iPhone Development
Changing Background Color of your hello world example
Picture 18 Getting Started with iPhone Development 
Selecting color for your hello world iphone application

Step 9: Press cmd + shift + L ( or click on tools and select library) drag the text field inside View and name it "Hello World". Save this file.

Picture 19 Getting Started with iPhone Development 
Dragging label to your hello world iPhone tutorial View

Picture 20 Getting Started with iPhone Development 
Add label to your view

Picture 22 Getting Started with iPhone Development 
Changing text on the label

Step 10: Open the xcode again. In Xcode Click on build and go button. You will see our application running in iphone simulator.

Picture 23 Getting Started with iPhone Development 
Simple Hello world iPhone tutorial output

Getting Started with iPhone Tutorial Code