Chapter 1
Creating Killer iPhone Applications
In This Chapter
? Figuring out what makes an insanely great iPhone application
? Listing the features of the iPhone that can inspire you
? Coming up against the limitations you have to live with
? Checking out the possibilities that are open to you
? Developing iPhone software now rather than later
Imagine that you’ve just landed at Heathrow Airport. It’s early in the morning,
and you’re dead tired as you clear customs. All you want to do now is
find the fastest way to get into London, check into your hotel, and sleep for a
few hours.
You take out your iPhone and touch the MobileTravel411 icon. On the left in
Figure 1-1, you can see it asks whether you want to use Heathrow Airport as
your current location. You touch Yes, and then touch Getting To From (as
you can see in the center of Figure 1-1). Since it already knows that you’re at
Heathrow, it gives you your alternatives. Because of the con Click to read more... Chapter 1
Creating Killer iPhone Applications
In This Chapter
? Figuring out what makes an insanely great iPhone application
? Listing the features of the iPhone that can inspire you
? Coming up against the limitations you have to live with
? Checking out the possibilities that are open to you
? Developing iPhone software now rather than later
Imagine that you’ve just landed at Heathrow Airport. It’s early in the morning,
and you’re dead tired as you clear customs. All you want to do now is
find the fastest way to get into London, check into your hotel, and sleep for a
few hours.
You take out your iPhone and touch the MobileTravel411 icon. On the left in
Figure 1-1, you can see it asks whether you want to use Heathrow Airport as
your current location. You touch Yes, and then touch Getting To From (as
you can see in the center of Figure 1-1). Since it already knows that you’re at
Heathrow, it gives you your alternatives. Because of the congestion in and
out of London, it suggests using the Heathrow Express, especially during
rush hour.
You touch the Heathrow Express tab and it tells you where to get the train
and also tells you that the fare is £14.50 if you buy it from the ticket machine
and £17.50 if you buy it on board the train. (The iPhone on the right in Figure
1-1 is proof that I’m not making this up.) It turns out that you’re so jetlagged
that you can’t do the math in your head so you touch the Currency button
and it tells you that £14.50 is around $21.35 if you took it from the ATM,
$21.14 on your no-exchange-rate-fee credit card, or $22.31 at the bureau de
change at the airport.
Another touch gets you the current weather, which prompts you to dig out a
sweater from your luggage before you get on the train.
COPYRIGHTED MATERIAL
10 Part I: Getting Started
When you get to Paddington Station, you really don’t have a clue where the
hotel that someone at the office booked for you might be. You touch Getting
Around, and the application allows you to use the hotel address that is in
your iPhone Contacts, and then gives you your options when it comes to
finally finding that big, comfortable, English bed. These include walking, taking
a taxi, and public transit. You touch Tube and it directs you to the nearest
Tube stop, and then displays fares, schedules, and how to buy a ticket.
Figure 1-1:
The Mobile-
Travel411
application
can use
your current
location.
How much of a fantasy is this?
Not much. Except for automatically determining your location and giving
you public-transit directions as well as real-time exchange rates (stuff I’ll be
adding in the near future) this application already exists. What’s more, it took
me only a little over two months to develop that application, starting from
where you are now, with no iPhone programming experience.
What Makes a Great iPhone Application
You’ll find a lot of different kinds of applications on the iPhone, ranging
from utilities like the Weather Application, to games, to the New York Times
reader, to the application I just described. Each one of these applications
also falls on another continuum.
At one end of this continuum is what I think of as the mobile desktop. These
are applications you might use if you were using your desktop or laptop —
applications you could port to (rewrite for) the iPhone. For example, I have a
Chapter 1: Creating Killer iPhone Applications 11
weather application on my MacBook Pro on which I can read the New York
Times as well — and it doesn’t take any major imaginative leap to see how
one can do the Weather/New York Times thing on an iPhone. Although I
wouldn’t think about writing this book on my iPhone, I can easily picture the
iPhone as a handy home for note-taking applications, spreadsheet apps, and
even stock-trading apps.
At the other end of this continuum are those applications that you would never
want to do on the desktop (or even a laptop), either because you don’t have
the hardware or because, even if you did, doing it that way would be way too
inconvenient. Imagine being at Heathrow, dead tired, taking out your laptop in
the middle of a crowded terminal, powering it up, launching the application,
and then navigating through it with the touch pad to get the information I got
easily while holding the iPhone in one hand. I want that kind of information
quickly and conveniently; I don’t want to have to dig my way to it through
menus or layers of screens (or even going through the hassle of finding a wireless
Internet connection). Seconds count. By the time any road warrior tied to
a laptop did this at Heathrow, I would already be on the Heathrow Express.
I like to think of these kinds of applications as here-and-now applications.
You want to do a specific task, with up-to-date information, which the iPhone
can access over the Internet through a cell network or Wi-Fi connection. You
may even want the information or tasks tailored to where you are, which the
iPhone can determine with its location hardware.
With all that in mind, I can think of two things that you need to consider —
besides functionality, of course — when it comes to creating a great iPhone
application:
? Create a compelling user experience.
? Exploit the platform.
The next few sections dig a little into my Two-Part Rule of Great iPhone
Applications.
Creating a Compelling User Experience
The iPhone allows an immediacy and intimacy as it blends mobility and the
power of the desktop to create a new kind of freedom. I like to use the term
user experience because it implies more than a pretty user interface and nice
graphics. A compelling user experience enables users to do what they need
to do with a minimum of fuss and bother. But more than that, it forces you to
think past a clean interface and even beyond basic convenience (such as not
having to scroll through menus to do something simple). It includes meeting
the expectations of the user based on the context — all the stuff going on
around a user — in which they are using the application.
12 Part I: Getting Started
A guidebook application may have a great user interface, for example, but
it may not give me the most up-to-date information, or let me know a tour
of Parliament is leaving in 5 minutes from the main entrance. Without those
added touches, I’m just not willing to consider an app compelling.
Exploiting the Platform
The iPhone’s unique software and hardware allow you to create an application
that enables the user to do something that may not be practical, or even possible
with a laptop computer. Although the iPhone is a smaller, mobile personal computer,
it is not a replacement for one. It is not intended to produce documents, proposals,
or research. The iPhone has the capability to be an extension of the user,
seamlessly integrated into his or her everyday life, and able to accomplish a singly
focused task, or step in a series of tasks, in real time, based on where he or she is.
Device-guided design
While the enormous capabilities of the iPhone that make it possible to deliver
the compelling user experience, you must take into account the limitations
of the device as well. Keeping the two in balance is device-guided design. The
next two sections describe both the features and limitations of the iPhone —
and how to take them into account as you plan and develop an application.
But understanding these constraints can also inspire you to create some
really innovative applications. After a closer look at device-guided design, I
come back to what makes a compelling user experience.
Exploiting the features
One of the keys to creating a great application is to take advantage of what
the device offers. In the case of a new platform with new possibilities, such
as the iPhone, this is especially important. Think about the possibilities that
open up to you when your application can easily do the following:
? Access the Internet
? Know the location of the user
? Track orientation and motion
? Track the action of the user’s fingers on the screen
? Play audio and video
? Access the user’s contacts
? Access the user’s pictures and camera
Chapter 1: Creating Killer iPhone Applications 13
Accessing the Internet
The ability to access Web sites and servers on the Internet allows you to
create applications that can provide real-time information to the user. It can
tell me, for example, that the next tour at the Tate Modern is at 3:00 o’clock.
This kind of access also allows you, as the developer, to go beyond the limited
memory and processing power of the device and access large amounts
of data stored on servers, or even offload the processing. I don’t have to have
all the information for every city in the world stored on my iPhone, and don’t
have to strain the poor CPU to compute the best way to get someplace on the
Tube. I can send the request to a server and have it do all that work.
This is client-server computing — a well established software architecture where
the client provides a way to make requests to a server on a network that’s just
waiting for the opportunity to do something. A Web browser is an example of a
client accessing information from other Web sites that act as servers.
Knowing the location of the user
The iPhone Operating System (OS) and hardware allow a developer to determine
the device’s current location, or even be notified when that location
changes. As people move, it may make sense for your application to tailor
itself to where the user is moment by moment.
There are already iPhone applications that use location information to tell
you where the nearest coffee house is, or even where your friends are. The
MobileTravel411 application uses this information to tell you the nearest
Tube stop and give you directions to your hotel.
Tracking orientation and motion
The iPhone contains three accelerometers — devices that detect changes
in movement. Each device measures change along one of the primary axes
in three-dimensional space. You can, for example, know when the user has
turned the device from vertical to horizontal, and change the view from
portrait to landscape if it makes for a better user experience. You can also
determine other types of motion such as a sudden start or stop in movement
(think of a car accident or fall), or the user shaking the device back and forth.
It makes some way cool features easy to implement — for example, the Etch-
A-Sketch® metaphor of shaking a device to reset it, and controlling a game by
moving the iPhone like a controller.
Tracking the action of the user’s fingers on the screen
People use their fingers, rather than a mouse, to select and manipulate
objects on the iPhone screen. The moves that do the work, called gestures,
give the user a heightened sense of control and intimacy with the device.
There is a set of standard gestures — taps, pinch-close and pinch-open,
flicks, and drags — that are used in the applications supplied with the
iPhone.
14 Part I: Getting Started
I suggest strongly that you use only the standard gestures in your application.
Even so, the iPhone’s gesture-recognition hardware and software allows you
to go beyond standard gestures when appropriate. Because you can monitor
the movement of each finger to detect gestures, you can create your own, but
use that capability sparingly — only when it’s undoubtedly the right thing to
do in your application.
Playing audio and video
The iPhone OS makes it easy to play and include audio and video in your
application. You can play sound effects, or take advantage of the multichannel
audio and mixing capabilities available to you. You can also play back
many standard movie file formats, configure the aspect ratio, and can specify
whether or not controls are displayed. This means your application can not
only use the iPhone as a media player, but also use and control pre-rendered
content. Let the games begin!
Accessing the user’s contacts
Your application can access the user’s contacts on the phone and display
that information in a different way, or use it as information in your application.
As a user of the MobileTravel411 application, for example, you could
enter the name and address of your hotel, and the application would file
it in your Contacts database. That way you have ready access to the hotel
address — not only from MobileTravel411, but also from your phone and
other applications. Then, when you arrive at Paddington Station, the application
can retrieve the address from Contacts and display directions for you.
Accessing the user’s pictures and camera
As with Contacts, your application can also access the pictures stored on the
user’s phone — and not only display them, but also to use or even modify
them. The Photos application, for example, lets you add a photo to a contact,
and there are several applications that enable you to edit your photos on the
iPhone itself. You can also incorporate the standard system interface to actually
use the camera as well.
Embracing the limitations
Along with all those features, however, the iPhone has some limitations. The
key to successful applications — and to not making yourself too crazy — is to
understand those limitations, live (and program) within them, and even learn
to love them. (It can be done. Honest.) These constraints help you understand
the kinds of applications that are right for this device.
Often it’s likely that if you can’t do something (easily, anyway) because of the
iPhone’s limitations, then maybe you shouldn’t.
Chapter 1: Creating Killer iPhone Applications 15
So learn to live with and embrace some facts of iPhone life:
? The small screen.
? Users with fat fingers (me included).
? Limited computer power, memory, and battery life.
The next sections can help get you closer to this state of enlightenment.
Living with the small screen
While the iPhone’s screen size and resolution allows you to deliver some
amazing applications, it is still pretty small. Yet while the small screen limits
what you can display on a single page, I have managed to do some mental
jujutsu on myself to really think of it as a feature.
When your user interface is simple and direct, the user can understand it more
easily. With fewer items in a small display, users can find what they want more
quickly. A small screen forces you to ruthlessly eliminate clutter and keep your
text concise and to the point (the way you like your books, right?).
Designing for fingers
While the Multi-Touch interface is an iPhone feature, it brings with it limitations
as well. First of all, fingers aren’t as precise as a mouse pointer, which
makes some operations difficult (text selection, for example). User interface
elements need to be large enough (Apple recommends that anything a user
has to select or manipulate with a finger be a minimum of 44x44 pixels in
size), and spaced far enough apart so that user fingers can find their way
around the interface comfortably.
You also can only do so much using fingers. There are definitely a lot fewer
possibilities using fingers than the combination of multi-button mouse and
keyboard.
Because it’s so much easier to make a mistake using just fingers, you also
need to ensure that you implement a robust — yet unobtrusive — undo
mechanism. You don’t want to have your users confirm every action (it
makes using the application tedious), but on the other hand, you don’t want
your application to let anybody mistakenly delete a page without asking, “Are
you sure this is what you really want to do?” Lost work is worse than tedious.
Another issue around fingers is that the keyboard is not that finger-friendly.
I admit it, using the iPhone keyboard is not up there on the list of things I
really like about my iPhone. So instead of requiring the user to type some
information, Apple suggests that you have a user select an item from a list.
But on the other hand, the items in the list must be large enough to be easily
selectable, which gets back to the first problem.
16 Part I: Getting Started
But again, like the small screen, this limitation can inspire (ok may force) you
to create a better application. To create a complete list of choices, for example,
the application developer is forced to completely understand the context
(and be creative about) what what the user is trying to accomplish. Having
that depth of understanding then makes it possible to focus the application
on the essential, eliminating what is unnecessary or distracting. It also serves
to focus the user on the task at hand.
Limited computer power, memory, and battery life
As an application designer for the iPhone, you have several balancing acts to
keep in mind:
? Although significant by the original Macintosh’s standards, the computer
power and amount of memory on the iPhone is limited.
? Although access to the Internet can mitigate the power and memory
limitations by storing data and (sometimes) offloading processing to a
server, those operations eat up the battery faster.
? Although the power-management system in the iPhone OS conserves
power by shutting down any hardware features that are not currently
being used, a developer must manage the trade-off between all those
busy features and shorter battery life. Any application that takes advantage
of Internet access using Wi-Fi or the 3G network, core location, and
a couple of accelerometers, is going to eat up the batteries.
The iPhone OS is particularly unforgiving when it comes to memory usage. If
you run out of memory, it will simply shut you down.
This just goes to show that not all limitations can be exploited as “features.”
A Compelling User Experience
When you’ve got a handle on the possibilities and limitations of the iPhone,
your imagination is free to soar to create a compelling user experience. Which
reminds me: It’s worth considering what “compelling user experience” really
means.
For openers, a compelling user experience has to result from the interaction
of several factors:
? Interesting, useful, plentiful content.
? Powerful, fast, versatile functionality.
? An intuitive, well-designed user interface.
Chapter 1: Creating Killer iPhone Applications 17
Compelling content
As I said earlier, there are a lot of different kinds of applications on the
iPhone. What most of the really good ones have in common is focus. They
address a well defined task that can be done within a time span that is appropriate
for that task. If I need to look something up, I want it right now! If I
am playing a game while waiting in line, I want it to be of short duration, or
broken up into a series of short and entertaining steps.
The application content itself then, especially for here-and-now applications,
must be streamlined and focused on the fundamental pieces of the task.
Although you can provide a near-infinity of details just to get a single task
done, here’s a word to the wise: Don’t. You need to extract the essence of
each task; focus on the details that really make a difference.
Here’s an example: The other night, my wife and I were standing with some
friends inside the lobby of a movie theater, trying to decide where to go
to grab some dinner. It was cold (at least by California standards) but we
wanted to walk to the restaurant from the theater. We had two iPhones going,
switching from application to application, trying to get enough information to
make a decision. None of the applications gave us what we really needed —
restaurants ranked by distance and type, with reviews and directions.
One of the applications was a great example of how to frustrate the user. It
allowed you to select a restaurant by distance and cuisine. After you selected the
distance, it gave you a list of cuisines. So far, so good. But the cuisine list was not
context-based; when I tapped Ethiopian, all I got was a blank screen. Very annoying!
I took it off my iPhone then and there — I don’t want an application that
makes me work only to receive nothing in return. Your users won’t either.
Every piece of a good application is not merely important to the task, but
important to where you are in the task. For example, if I’m trying to decide
how to get to central London from Heathrow, don’t give me detailed information
about the Tube until I need it.
That doesn’t mean your applications shouldn’t make connections that ought
to be made. One aspect of a compelling user experience is that all the pieces
of an application work together to tell a story. If the tasks in your application
are completely unconnected, perhaps they should be separate applications.
An application such as MobileTravel411 is aimed at people who may not know
anything about their destination. If the application informs them that one
reason to take the Heathrow Express is that it offers convenient Tube access
on arrival in London, the users then have a bite-size bit of valuable information
about how to get around London once they’re in the city. Save the train
routes for when they’re in the station.
18 Part I: Getting Started
By limiting the focus to a single task, it also enables you to leave behind
some iPhone constraints, and the limitations of the iPhone can guide you to a
better application design.
Consistency with the user’s world
Great applications are based on the way people — users — think and work.
When you make your application a natural extension of the user’s world, it
makes the application much easier and pleasant to use — and to learn.
Your users already have a mental model that describes the task your software
is enabling. The users also have their own mental models of how the
device works. At the levels of both content and user interface, your application
must be consistent with these models if you want to create a superb
user experience (which in turn creates loyalty — to your application).
The user interface in MobileTravel411 was based on how people divide up
the experience of traveling. Here are typical categories:
? Foreign currency — how much it really costs and what’s the best way to
convert money and buy things abroad.
? Getting to and from the airport with maximum efficiency and minimum
hassle.
? Getting around a city, especially an unfamiliar one.
? Finding any special events happening while you’re in the city.
? Handling traveler’s tasks — such as making phone calls, tipping, or finding
a bank or ATM — with aplomb.
? Checking the current weather and the forecast.
? Staying safe in unfamiliar territory — places you shouldn’t go, what to
do if you get in trouble, and so on.
This is only a partial list, of course. I get into this aspect of application design
in more detail when I take you through the design of MobileTravel411.
I suppose there are other ways to divide up the tasks, but anything much different
would be ignoring the user’s mental model — which would mean the application
wasn’t meeting some of the user’s expectations. It would be less pleasant
to use because it would impose an unfamiliar way of looking at things instead of
building on the knowledge and experiences those users already have.
When possible, model your application’s objects and actions on objects and
actions in the real world. For example, the iPhone has a set of iPod-style
playback controls, tapping controls to make things happen, sliding on-off
switches, and flicking through the data shown on Picker wheels. All of these
are based on physical counterparts in the real world.
Chapter 1: Creating Killer iPhone Applications 19
Your application’s text should be based on the target user. For example, if
your user isn’t steeped in technical jargon, avoid it in the user interface.
This does not mean that you have to “dumb down” the application. Here are
some guidelines:
? If your application is targeted for a set of users who already use (and
expect) a certain kind of specialized language, then sure, you can use
the jargon in your application. Just do your homework first and make
sure you use those terms right.
For example, if your application is targeted at high-powered foreignexchange
traders, your application might use pip (“price interest point” —
the smallest amount that a price can move, as when a stock price advances
by one cent). In fact, a foreign exchange trader expects to see price movement
in pips, and not only can you, but you should use that term in your
user interface.
? If your application requires that the user have a certain amount of specialized
knowledge about a task in order to use your application, identify
what that knowledge is up front.
? If the user is an ordinary person with generalized knowledge, use ordinary
language.
Gear your application to your user’s knowledge base. In effect, meet
your users where they are; don’t expect them to come to you.
The user interface – form
following function
Basing your application on how the user interacts and thinks about the world
makes designing a great user interface easier.
Don’t underestimate the effect of the user interface on the people who are
trying to use it. A bad user interface can make even a great application painful
to use. If users can’t quickly figure out how to use your application, or if
the user interface is cluttered or obscure, they’re likely to move on and probably
complain loudly about the application to anyone who will listen.
Simplicity and ease of use are fundamental principles for all types of software,
but in iPhone applications they are critical. Why? One word: multitasking.
iPhone OS users are probably doing other things simultaneously while
they use your application.
The iPhone hardware and software is an outstanding example of form following
function; the user interfaces of great applications follow that principle as
well. In fact, even the iPhone’s limitations (expect for battery life) are a result
20 Part I: Getting Started
of form following from the functional requirements of a mobile device user.
Just think how the iPhone fulfills the following mobile device user wish list:
? Small footprint
? Thin
? Light weight
? Self contained — no need for an external keyboard or mouse
? Task oriented
It’s a pretty safe bet that part of the appeal of the iPhone to many people —
especially to non-technical users (like most of my friends) — is aesthetic:
The device is sleek compact, and fun to use. But the aesthetics of an iPhone
application aren’t just about how “beautiful” your application is on-screen.
Eye candy is all well and good, but how well does your user interface match
its function — that is, do its job?
Consistency
As with the Macintosh, users have a general sense of how applications work
on the iPhone. (The Windows OS has always been a bit less user-friendly, if
you ask a typical Mac user.) One of the early appeals of the Macintosh was
how similarly all the applications worked. So Apple (no fools they) carried
over this similarity into the iPhone as well. The resulting success story suggests
the following word to the wise. . . .
A compelling iPhone user experience usually requires familiar iPhone interface
components offering standard functionality, such as searching and navigating
hierarchical sets of data. Use the iPhone standard behavior, gestures,
and metaphors in standard ways. For example, users tap a button to make a
selection and flick or drag to scroll a long list. iPhone users understand these
gestures because the built-in applications utilize them consistently. Fortunately,
staying consistent is easy to do on the iPhone; the frameworks at your disposal
have that behavior built in. This is not to say that you should never extend the
interface, especially if you’re blazing new trails or creating a new game. For
example, if you were creating a roulette wheel for the iPhone, why not use a circular
gesture to spin the wheel, even if it isn’t a “standard” gesture?
Making it obvious
Although simplicity is a definite design principle, great applications are also
easily understandable to the target user. If I’m designing a travel application,
it has to be simple enough for even an inexperienced traveler to use. But if I’m
designing an application for foreign-exchange trading, I don’t have to make it
simple enough for someone with no trading experience to understand.
? The main function of a good application is immediately apparent and
accessible to the users it’s intended for.
Chapter 1: Creating Killer iPhone Applications 21
? The standard interface components also give cues to the users. Users
know, for example, to touch buttons and select items from table views
(as in the contact application).
? You can’t assume that users are so excited about your application that
they are willing to invest lots of time in figuring it out.
Early Macintosh developers were aware of these principles. They knew that
users expected that they could rip off the shrink-wrap, put a floppy disk in
the machine (these were really early Macintosh developers), and do at least
something productive immediately. The technology has changed since then;
user attitudes, by and large, haven’t.
Engaging the user
While we’re on the subject of users, here’s another aspect of a compelling
application: direct manipulation and immediate feedback.
? Direct manipulation makes people feel more in control. On the desktop,
that meant a keyboard and mouse; on the iPhone, the Multi-Touch
interface serves the same purpose. In fact, using fingers gives a user a
more immediate sense of control; there’s no intermediary (such as a
mouse) between the user and the object on-screen. To make this effect
happen in your application, keep your on-screen objects visible while
the user manipulates them, for example.
? Immediate feedback keeps the users engaged. Great applications
respond to every user action with some visible feedback — such as
highlighting list items briefly when users tap them.
Because of the limitations imposed by using fingers, applications need to be
very forgiving. For example, although the iPhone doesn’t pester the user to
confirm every action, it also won’t let the user perform potentially destructive,
non-recoverable actions (such as deleting all contacts or restarting a
game) without asking, “Are you sure?” Your application should also allow the
user to easily stop a task that’s taking too long to complete.
Also: Notice how the iPhone uses animation to provide feedback. (I especially
like the flipping transitions in the weather application when I touch the Info
button.) But keep it simple; excessive or pointless animation interferes with
the application flow, reduces performance, and can really annoy the user.
Why Develop iPhone Applications?
Because you can. Because it’s time. And because it’s fun. Developing my
iPhone applications has been the most fun I’ve had in many years (don’t tell
my wife!). Here’s what makes it so much fun (for me, anyway):
22 Part I: Getting Started
? iPhone apps are usually bite-size — small enough to get your head
around. A single developer — or one with a partner and maybe some
graphics support — can do them. You don’t need a 20-person project
with endless procedures and processes and meetings to create something
valuable.
? The applications are crisp and clean, focusing on what the user wants
to do at a particular time and/or place. They’re simple but not simplistic.
This makes application design (and subsequent implementation)
much easier — and faster.
? The free iPhone Software Development Kit (SDK) makes development
as easy as possible. I reveal its splendors to you throughout this book.
If you can’t stand waiting, you could go on to Chapter 3, register as an
iPhone developer, and download the SDK . . . but (fair warning) jumping
the gun leads to extra hassle. It’s worth getting a handle on the ins and
outs of iPhone application development beforehand.
The iPhone has three other advantages that are important to you as a developer:
? The App Store. Apple will list your application in the App Store, and
take care of credit-card processing, hosting, downloading, notifying
users of updates, and all those things that most developers hate doing.
Developers name their own prices for their creations; Apple gets 30% of
the sales price, with the developer getting the rest.
Apple has an iPhone developer program. To get your application into
the store, you have to pay $99.00 join the program. But that’s it. There
are none of the infamous “hidden charges” that you often encounter,
especially when dealing with credit-card companies. I explain how to
join the developer program in Chapter 3, and how to work with the App
Store in Chapter 13.
? It’s a business tool. The iPhone has become an acceptable business
tool, in part because it has tight security, as well as support for
Microsoft Exchange and Office. This happy state of affairs expands the
possible audience for your application.
Examining the Possibilities
Just as the iPhone can extend the reach of the user, the device possibilities
and the development environment can extend your reach as a developer.
Apple talks often about three different application styles:
? Productivity applications use and manipulate information. The
MobileTravel411 application is an example.
? Utility applications perform simple, highly defined tasks. The weather
application is an example.
Chapter 1: Creating Killer iPhone Applications 23
? Immersive applications are focused on delivering — and having the
user interact with — content in a visually rich environment. A game is a
typical example of an immersive application.
Although these categories help you understand how Apple thinks about
iPhone applications (at least publicly), don’t let them get in the way of your
creativity. You have probably heard ad nauseam about stepping outside
the box. But hold on to your lunch; the iPhone “box” isn’t even a box yet. So
here’s a more extreme metaphor: Try diving into the abyss and coming up
with something really new.
The Sample Applications
When I started writing this book, I decided that there was no way I was going
to do what legions of computer-book authors have done from time immemorial.
You know — some kind of insipid “Hello World” application.
With a little more (although not much more) work, you can use the development
environment to actually create something of value.
In Figure 1-2, you can see the first application that I show you how to develop —
the one I thought about after I lost my iPhone for the first time. I realized
that if anyone found it and wanted to return it, well, returning it wouldn’t be
easy. Sure, whoever found it could root around in my Contacts or Favorites
and maybe call a few of them and ask if any of their friends had lost an
iPhone. But to save them the work, I decided to create an application called
ReturnMeTo, whose icon sat on the upper-left corner of the home screen and
looked like something you would want to select if you had found this phone.
It would show a phone number to call and create a very happy person at the
receiving end of the call.
Originally I thought I would simply create this application and then get
on with the rest of the book. It turned out, however, that as I showed my
friends the application, I got a lot of feedback and made some changes to it.
I’ll include those changes as well — because they’ll give you insight to the
iPhone application-development process. All my friends also told me that
they’d love to have the application (hey, they’re my friends, after all).
To pay them back for using them as a test group, I’ll be uploading it to the App
store — I show you how to do the same with yours, in detail, in Chapter 13.
After I go through developing ReturnMeTo, I take you through the design of
MobileTravel411 in Chapter 14. Then I show you how to implement a subset
of this application, iPhoneTravel411, which shows you how to use much of
the “technology” that implements the functionality of the MobileTravel411
application. You’ll find out how to use table views (like the ones you see
in the Contacts, iPod, Mail, and Settings applications that come with the
24 Part I: Getting Started
iPhone), access data on the Web, go out to and return from Web sites while
staying in your application, store data in files, include data with your application,
allow users to set preferences, and even how to resume your application
where the user last left off. I’ll even talk about localization and self-configuring
controllers and models. (Don’t worry; by the time you get there, you’ll
know exactly what that means.)
Figure 1-2:
ReturnMeTo
— please!
What’s Next
I’m sure that you are raring to go now and just can’t wait to download the
Software Development Kit (SDK) from the iPhone Developers Web site. That’s
exactly what I did back in the day — and later was sorry that I didn’t spend more
time up front understanding how applications work in the iPhone environment.
So I ask you to be patient. In the next chapter I explain what goes on behind
the screen, and then, I promise, it’s off to the races. Click to close
|