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:
1. Web Application Development
2. Native Application Development
3. Hybrid Application Development
Web Application Development:
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:
In order to develop iPhone SDK applications and continue this tutorial, you will need the following:
1. 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.
2. 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.
3. Xcode and the iPhone SDK 4.
After logging into your developer account, download and install Xcode 3.2.5 and iPhone SDK 4 (or the latest available versions).
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:
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 Implementation File
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.