iPhone Tutorial for Beginner | Programmer | Developer

Help to build mobile applications for Apple Store

Getting Started with iPhone Development

Posted by Adeem Basraa On July - 3 - 2009
New in iPhone Development? You can now follow this blog on google readers or subscribe for email or Twitter!
If my tutorial help you then please donate, so that i continue writing free tutorials for every developer/programmer/freelancer

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. I have also created a screen cast of this. If you do not like to read these 10 steps , you can simply move to video tutorial page.

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)

customize UITableView using UITableViewCell
Downloaded iPhone SDK 2.2.1

customize UITableView using UITableViewCell
Installing iPhone SDK 2.2.1

customize UITableView using UITableViewCell
Verifying iPhone SDK installation

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

customize UITableView using UITableViewCell
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.

customize UITableView using UITableViewCell
Creating your first iPhone Application

Step 4: Select “View-Based Application” and click ‘Choose’. Name it HelloWorld and click finish.

customize UITableView using UITableViewCell
Selecting right chose for your first iPhone application

customize UITableView using UITableViewCell
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.

customize UITableView using UITableViewCell
First View of your files created by SDK

customize UITableView using UITableViewCell
Build and GO button in iPhone SDK
customize UITableView using UITableViewCell
Output of your hello world iPhone application

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

customize UITableView using UITableViewCell
Home button in iPhone Simulator

customize UITableView using UITableViewCell
Hello world iPhone application icon

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

customize UITableView using UITableViewCell
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.

customize UITableView using UITableViewCell
Selecting view from Interface builder

customize UITableView using UITableViewCell
Changing Background Color of your hello world example
customize UITableView using UITableViewCell
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.

customize UITableView using UITableViewCell
Dragging label to your hello world iPhone tutorial View

customize UITableView using UITableViewCell
Add label to your view

customize UITableView using UITableViewCell
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.

customize UITableView using UITableViewCell
Simple Hello world iPhone tutorial output

Getting Started with iPhone Tutorial Code

You can grab this code from here.

Watch the video tutorial

Click here to watch the video tutorial of your first hello world iPhone application.


Popularity: 78% [?]

Related posts:

  1. Beginner iPhone SDK Hello World Tutorial [Example & Code] In this tutorial I will walk to you through creating...
  2. iPhone Tutorial for Retrieving Contact information from AddressBook Introduction In this tutorial I will explain how you can...

5 Responses to “Getting Started with iPhone Development”

  1. Matt says:

    Thank you for this – it’s so good to see something for my level :D
    I’m eager to start developing for iPhone and this is going to help me do it.

  2. dan says:

    Hey, appreciating the tutorials! thanks alot!
    i have a endless list of tutorials to request but ill just start with the one :]

    what i would really like you to do is a tutorial on a user editable UIPicker in a sub view.
    iv been looking every where and theres nothing clear enough to work from! and i say in a sub view because all tutorials on making the UIPicker in its self are for the mainView and use the appDelegate which ( being new to developing) makes it alot harder to follow when using it in a realistic app.
    i eventually did figure it out using sample code but i bet alot of new developers would appreciate a straight forward tutorial!

    so to sum up, my request is for a user editable UIPicker. Like How a UITable can have text added and deleted.

    hope you can get around to doing this :] thanks

  3. Alwinkov says:

    Youre iPhone Development tutorials are great!

    Can you make a tutorial for a tableview app that have a springboard menu on the start of the app.
    ( 16 icon’s menu at the start, 4 rows and the 16 cells)

    icon 1 | icon 2 | icon 3 | icon 4 |
    icon 5 | icon 6 | icon 7 | icon 8 |
    icon 9 | icon 10 | icon 11 | icon 12 |
    icon 13 | icon 14 | icon 15 | icon 16 |

    click on a icon and you get a tableview.

    There no tutorial on the internet about this…

    Best Regards,
    Alwinkov

  4. [...] 原文见:Getting Started with iPhone Development   编程   编程, 初学者, 教程   [...]

  5. Thanks for these tutorials, but they are a bit out of date with the advent of the new SDK. You might update them with the new screens soon, since there are more and more of us new developers that need to see these tutorials in the new environment, since its rather drastically different.

    Thanks.

Leave a Reply

Support Me $5

Subscription Options: