I received lots tutorial requests from my readers that asked to me, how to start iPhone and iOS application development. We are planning to write a iPhone and iOS application development tutorial series for this you need a Mac iOS and Xcode IDE. Just follow these steps and you can create a simple “Hello World” program.

Author

Arun Kumar Munusamy
Mobile Application Developer
Chennai, INDIA
Mobile Application Developer
Chennai, INDIA
Step 1
Open XCode and click create new project as shown in below image. ipod repair

Step 2
Select an empty application

Step 3
Enter project name and set device family as iPhone.

Step 4
Set project location and click create button.

Step 5
Your project will be created as shown below.

Step 6
Project property windows contains appdelegate files and other supporting files. We need to create a screen/class with xib(user interface). Right click on the project folder and select new file as shown in the below image.

Step 7
You have to select Objective-C class and Click next

Step 8
Rename the class to homescreen(what ever you wish) and select UIViewController in the Subclass of dropdown and check the “with XIB for user interface” to include user interface file and click next

Step 9
It will ask you to select location to create file. You no need to change the default location. You can click create button.

Step 10
Home screen has been successfully created and it will look like below image.

Now open homescreen.h file and create a UIButtonField with its onclick function programmatically with the below mentioned code.
@interface homescreen : UIViewController
{
IBOutlet UIButton *btn_hello;
}
@property(nonatomic, retain)IBOutlet UIButton *btn_hello;
-(IBAction)btn_hello_click;
@end
{
IBOutlet UIButton *btn_hello;
}
@property(nonatomic, retain)IBOutlet UIButton *btn_hello;
-(IBAction)btn_hello_click;
@end
Now your homescreen.h file will look like this

Now open homescreen.m file and synthesize your button field at top and add a alert box in the button click function as shown below
@synthesize btn_hello;
-(IBAction)btn_hello_click
{
UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Success !!!"
message:@"Hello iPhone"
delegate:self cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
[alertView release];
}
-(IBAction)btn_hello_click
{
UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Success !!!"
message:@"Hello iPhone"
delegate:self cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
[alertView release];
}
The memory allocated by the button has to be released manually as shown below
- (void)dealloc
{
[btn_hello release];
[super dealloc];
}
{
[btn_hello release];
[super dealloc];
}
So your homescreen.m file will look like the below shown image

Step 11
Now it’s time for design part. Open the homescreen.xib file and drag a button in the right side object window and drop it in the view controller.

Step 12
Now double click on the button and enter text as “Click Me !”.

Step 13
Now under objects panel on left side, right click on the button as shown below

Step 14
Now click on the “Touch Down” option and link it to “File’s Owner” as show below.

Step 15
Now the button click function declared in header and main file will get pop up.

Step 16
Select the function. This process will link the function to the button click event.

So design part is over. Now your application is ready. But, the problem is this is an empty application. Application don’t know where to start. So we need to redirect the application to the home screen.
Open Appdelegate.h file and declare UINavigationController as shown below
@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
UINavigationController *navigationController;
}
@property(strong,nonatomic)UINavigationController *navigationController;
@property (strong, nonatomic) UIWindow *window;
@end
{
UINavigationController *navigationController;
}
@property(strong,nonatomic)UINavigationController *navigationController;
@property (strong, nonatomic) UIWindow *window;
@end
Your Appdelegate.h file will look like this

Step 16
Now open AppDelegate.m file and mention the homescreen to be the start point of the application as shown below
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIViewController *homeController = [[homescreen alloc] initWithNibName:@"homescreen" bundle:nil];
navigationController = [[UINavigationController alloc] initWithRootViewController:homeController];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window addSubview:navigationController.view];
[self.window makeKeyAndVisible];
return YES;
}
{
UIViewController *homeController = [[homescreen alloc] initWithNibName:@"homescreen" bundle:nil];
navigationController = [[UINavigationController alloc] initWithRootViewController:homeController];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window addSubview:navigationController.view];
[self.window makeKeyAndVisible];
return YES;
}
Step 17
Your AppDelegate.m file will look like below image. Now it’s done. Click on the run icon on the top left corner as shown in below image.

Step 18
It will take few min to open the iphone simulator and your project. Your application will look like below image

Step 19
Now click the “Click Me !” button.










And if any one like me won't have MAC then he can simply use Phone GAP which is cool and works awesome, supports many platforms and the best part you can also use Web application programming languages like Javascript for giving it action, CSS for making the UI and HTML for making objects.
http://phonegap.com/ and for tutorials about Phone GAP you can simply see the documentation, if you know Javascript CSS and HTML then just the way how to use the IDE and everything you will learn automatically!!
but then also thanks for the tutorial!
hey if you can also give a demo on "facebook like commenting system" which allows add, edit and delete of comments
cool.. but how to i test it on my iphone??
nice
thanks for you tutorial, I´m waiting by the next tutorial, thankssssss !!!
I would have liked some explanation of each part but thanks :)
great work...
Nice Startup!
thanks guys Keep the good work up :)
Step 1
buy a mac
nice one tutorial..
nice one.. good for the beginner.. thanks
Can you please tell me from where I can get Mac iOS and Xcode IDE.
Thanks
Is it possible to develop iphone applications on Windows ?
thanks a lot
nice
Again a great lesson from 9lellons. Thanks a lot.
Nice Tutorial
Nice Tutorial But this is just a start hope we will see more iPhone tutorials on 9lessons
How To I Deploy In Operating System Windows 7...??
How can i download Xcode iphone simulater for windows 7?
nice, more tutorial please :-D
thanks for this one.
Nice Sharing Arun. Thanks a lot!
you are providing a nice step by step information but i can not displying the images which you are post in this blog.this tutorial is very helpful for me in future because i want to learn an iPad development.
Fantastic tutorial you have given great!
Well Done Tamada... I love such a step by step tutorials...
great style to explain the things..
I waited this tutorial since two years , thank you Arun!
But sir how to use this software on Window 7
Great! I like to develop for iPhone
Officially it is not possible to develop native IPhone applications in windows OS. But unofficially, i heard that OS X(mac OS) can be installed through virtual machine in windows OS and application can be developed. I will try on this process and if i get succeed means i will post that as an article here.
When will you publish the next tutorial??
Great article ! Thanks for this :)
Very good step by step tutorial. I hope to see more on the deployment tutorial :)
nice tutorial and thanks for it
This is a nice tutorial to develop your own first iPhone Application.
@Yanker: Next tutorial is almost ready. Will publish soon.
can i xcode on vmware mac image?
Good Knowlege..
There is big range of people are using Mobiles app so its necessary think to iPhone app development.You are describing good information about iPhone app development.
Great article dude! Best part about this article is the step by step approach towards the process of iOS app development. Am sure a lot of readers, especially developers, will be greatly benefited by this article.
Thanks for this 16 Excellent Steps to Develop iPhone Apps To Success In Iphone Application Development. It´s people like you who make the Internet to a such fantastic and great forum for collaboration and learning. Keep up the good work!
Nice tutorial. I am building Apps from scratch over on my site HERE. I haven't gotten to this point yet but I will be sure to come back and review this informative article when I reach that part of the process. Thanks for the info!
Thanks for providing this useful tutorial in developing a simple iPhone “Hello world” program. The screenshots that you have provided are useful in understanding the various steps with clarity.
The people who want to develop iPhone application on windows should remember time is precious. Tool that can be used for iPhone app develpoment is the Dragonfire SDK.
Firs app by picking a project that you simply would get pleasure from completing. Don't select a quite difficult project or even a project that takes a extended time.