iPhone Life magazine

Developing Software for the iPhone

Whether you're new to mobile development or not, there's a lot to learn

One of the biggest criticisms of the original release of the iPhone was that you couldn't install custom applications. Now that Apple has released the iPhone 2.0 OS, which allows the installation of third-party software through iTunes and a Software Development Kit to create them, that criticism no longer applies. Whether it's games, organizational tools, or business applications, the sky's the limit with iPhone 2.0.

Making the paradigm shift

To develop software for the iPhone, there are two key paradigm shifts that must be made. The first shift is to understand the capabilities and limitations of a mobile device. Compared to a desktop or notebook computer, any software written for a mobile device like the iPhone must be dramatically simplified in order for it to be usable. You can't bring all of the capabilities of an existing application to a form-factor like this; you must identify the core feature set which is absolutely necessary.

The second shift is to the world of Apple. Unless you've developed for the Mac, you're probably not familiar with any of the tools required for iPhone development. First of all, iPhone development must be done on a Mac. Additionally, Apple put a lot of thought into the design of the user interface on the iPhone and iPod touch and is very protective about it. They have some very stringent user interface design guidelines that you must follow when designing applications for their devices. Finally, all third-party applications must be distributed through the App Store in iTunes. This last requirement gives Apple plenty of power to enforce their other guidelines.

Focus on solutions—not features

When you first begin thinking about your mobile application, you need to identify the core solution that your app will provide, rather than a collection of features. Since almost all of your users will only use 20% of the features 80% of the time, you will probably need to design your app in such a way that only those 20% of the features are provided. If you try to include everything, your app may become so clunky and complex that nobody will want to use it at all. The key to success is to keep it simple.

Ensuring the user experience

Apple's position is that in order to ensure a consistent experience, every application should have a simple look and feel. It should not be cluttered, and it must be easily navigated using only a finger. You must use the interface design elements consistently, and in a way that was intended by Apple. Additionally, only one iPhone application can be running at a time, which means that there are no background processes. Finally, if a phone call comes in, your application must quickly and elegantly save all its data and shut itself down. This is simply the price you have to pay to develop an iPhone application. I would highly recommend downloading the document entitled "iPhone Human Interface Guidelines" from Apple's iPhone Dev Center (developer.apple.com/iphone).

Objective-C and Cocoa Touch

If you're not familiar with Mac development, you may never have even heard of Objective-C and Cocoa. Objective-C is the preferred language for developing native iPhone and iPod touch applications. It is a reflective, object-oriented language which adds Smalltalk-style messaging to C. Cocoa is Apple's native application programming framework for the Mac OS X operating system. Cocoa Touch is based on the full-blown Cocoa API, and it is designed for the more touch-driven set of user interactions used on the iPhone and iPod touch.

Xcode and the iPhone SDK

The iPhone SDK is a free download from Apple (developer.apple.com/iphone). It includes a complete set of tools for development, testing, debugging, and tuning of your application. Xcode is an integrated development environment, or IDE, that can be used to develop both Mac and iPhone applications. It helps you organize your project and easily use the other tools in the SDK like Interface Builder, Instruments, and the iPhone Simulator. Interface Builder is the tool to create a user interface for your applications. Instruments is another tool used to trace and profile your application as it runs. It helps you understand how your application is behaving in order to optimize or debug it. Finally, the iPhone Simulator is a tool that runs and debugs your iPhone apps on a Mac.


The App Store—it's in Apple's hands

Unlike the various ways that most mobile software is distributed today, iPhone software will be distributed through a centralized App Store. Even enterprise customers that build custom applications for their own business will have a personalized version of the App Store that only their employees will be able to access. As such, Apple has control over what apps are included or not. They will keep 30% of the product revenue, and pass 70% on to the developer. While this creates significant opportunity, it also challenges the developer to come up with new ways to differentiate your application from all the others.

Get started by jumping in

The best way to get started developing for the iPhone is to just jump in and do it. If you already have a Mac, you can download the SDK for free. The iPhone Dev Center (developer.apple.com/iphone) has numerous documents, code samples, and even free training videos that can be downloaded through iTunes. I would highly recommend downloading the videos and watching them—they provide a very easy-to-experience introduction to the platform and the requirements of developing iPhone apps.

Good luck developing your first iPhone application!