iPhone Development Introduction
Mobile devices are becoming
extremely common in today's world. Most users can easily consume all the
content on small mobile devices. This eliminates a need to carry a laptop
computer with them all the time. We are entering into a new revolution in which
mobile devices will be the main source of consuming content. iPhone is the most popular mobile
device in the market today selling over 1 million devices in few days. In this
article we are going to introduce iPhone development from the point of view of
the .NET developer.
In order to develop for the iPhone you must first purchase Mac. If
you are looking for less expensive solutions then Mac Mini will be an excellent
choice. After buying the Mac you must download the XCode and the framework to precede next step.
You will learn information about
the iPhone platform, how to setup and configure your development environment,
and the steps necessary to create a simple fortune cookie application.
About the Platform:
iOS is a mobile optimized variant of Mac OS X created by Apple Inc.
It is distributed with all iPod touch, iPhone,
and iPad devices, and only occupies
about 500 MB of storage space.
There are three distinct
approaches to iOS development:
Hybrid Application Development
Web Application Development:
The original iPhone OS 1.0 required all non-Apple
applications to be web-based and executed within the Mobile Safari web browser.
Because Mobile Safari does not support plugins like Adobe Flash or Microsoft
Silverlight, this meant that all third party applications were originally
viable option today, especially for applications that must be accessible on a
wide range of devices or for development teams with an aversion to Mac OS X and
Native Application Development:
With the release of iPhone OS 2.0
and the introduction of the iPhone SDK and iTunes App Store, developers have
been encouraged to write native applications for the iPhone using Objective-C
and Xcode. Native applications are compiled binaries that are installed and
executed on the user’s device. These applications are granted considerable
access to the device hardware, and only native application binaries can be
distributed through the iTunes App Store. Because the iPhone OS runs on iPod
touch, iPhone, and iPad devices, most applications can be built for all three
devices with only minor code variations, though there are significant
advantages to optimizing your application for the much larger iPad screen.
Hybrid Application Development:
It is also possible to combine
the above approaches and create iPhone applications that are installed on a
released through the iTunes App Store. Such applications are growing in
popularity thanks to open-source libraries like QuickConnect and platforms like
PhoneGap, AppCelerator, and rhomobile.
In order to develop iPhone SDK
applications and continue this tutorial, you will need the following:
An Intel-based Mac running Mac OS X Snow Leopard:
In order to write native
applications with the official iOS SDK and test your applications in Apple’s
official iPhone or iPad Simulator, you will need to be able to run Snow
Leopard, the latest desktop and laptop operating system from Apple.
An Apple Developer account.
This is required to download the
iPhone SDK 4, the Xcode IDE, and the iPhone Simulator. You will need to
register for an Apple Developer account here. Registration is free and will
allow you to run applications in the iPhone simulator. A free account is all
that is needed for this tutorial, but to actually run your apps on a device or
publish through the iTunes App Store you will need to pay to enroll in the
iPhone Developer Program.
the iPhone SDK 4.
After logging into your developer
account, download and install Xcode 3.2.5 and iPhone SDK 4 (or the latest
After you have the above, you
should be ready to dive into building ‘FirstIphoneApplication’a simple iPhone
application; to build a sample application you have to follow some following
Steps 1: Launch Xcode and Create your project
Steps 2: Launch Interface Builder and Create the Interface
Steps 3: Code the FirstIphoneApplicationViewController Header File
Steps 4: Connect Interface Builder to FirstIphoneApplicationViewController
Steps 5: Code the FirstIphoneApplicationViewController
This tutorial has provided you
with a brief introduction to native iPhone OS application development with
Xcode, Interface Builder, and the iPhone SDK. We covered some of the basics of
the platform and you got your feet wet with Interface Builder and Xcode.
The material covered in this
tutorial will be expanded upon in future tutorials as we dive further into
Objective-C, Cocoa-Touch, and the iPhone SDK.