Category Archives: Technology

So you want to write an iPhone app (2)

Are you the kind of person who, upon receiving a new electronic gadget, tears open the package, tosses the instruction manual aside and starts using the new gizmo immediately? Or do you sit down and read every word of the manual before trying your new toy? I’m somewhere in the middle of that spectrum. I like to read enough to make sure I’ve got the basics but I don’t have the patience to digest the whole user’s guide before I touch anything.

You’ll have a similar choice to make after downloading the iPhone SDK. You could just start running the development tools and “feel your way around” but, chances are, you’ll waste a lot of time that way (and get very frustrated in the process). On the other hand, you could spend days or even weeks watching videos and reading documents before writing a single line of code, which could cause you to lose your momentum and never quite make it to writing the next great iPhone app.

On the download page, Apple offers two collections of getting started material: videos and documents. I’m opting to use the latter simply because I can control the information mining process much more effectively by reading a document than I can by watching a video. If I get very interested in a particular topic, I may try one of more of the videos but for now I’m viewing those as reference material.

If your goal, like mine, is to write a real iPhone app in this lifetime then I would advise making a quick pass through the seven getting started docs, as follows:

  • iPhone OS Overview – fast skim for background
  • Tools for iPhone OS Development – fast skim to understand what each tool is used for
  • Learning Objective-C – A Primer – slow skim to get up to speed on the language
  • Signing Code for iPhone Development (skip it – worry about this when you have an app to sign)
  • Creating an iPhone Application (slow skim)
  • iPhone OS for Cocoa Developers (slow skim)
  • Frequenty Asked Questions (fast skim for background)

I’m planning to spend a day or so skimming the above material. I’ve highlighted the three documents on which I intend to spend the most time in boldface type. When I’m done I’ll report any findings of particular interest and then I’ll move on to writing my first app.

So you want to write an iPhone app…

The first thing you need to know is that Apple’s official software development platform for the iPhone works only on OS X so if you are a PC-only household you may be out of luck. Fortunately for me, my daughter has a MacBook, which she’ll share with me if I’m extra nice to her. 

Now for the requirements: you’ll want to have software release 2.2 loaded on your iPhone and OS X version 10.5.5 (or later) on your Mac. The iPhone SDK takes roughly 4.4 GB so you’ll need at least that much free space on one of your local hard drives.

So now you’re ready to download the iPhone SDK (software development kit), which can be done from this site: http://developer.apple.com/iphone/sdk1/. You’ll need an Apple ID, which you can create via the “Create Apple ID” link at the above URL.

If and when you get serious about distributing apps to real customers via the iTunes app store, you’ll need to apply to the iPhone Developer Program, which will set you back $99 (one time charge, not per app). The good news is you can “try before you buy”, i.e. download the tools, write and and test some apps, play to your heart’s content, before you commit to the $99 enrollment fee.

I’ll have more to say about the development tools, the IDE, the language, the API, etc. but for now I just wanted to share some quick guidance about getting started. The good news is that if you have a Mac with some available disk space, it’s easy and free to set yourself up as an iPhone developer.

I <3 my iPhone

I bought myself an iPhone 3G a few weeks ago and I’m delighted with it. If you think about it, there’s really no fundamentally new technology associated with this device – what’s really great about it is the way in which it combines so many existing technologies into one elegant package. It’s the swiss army knife of cell phones. I use my iPhone as a:

  • mobile phone
  • email client
  • digital camera
  • calculator
  • calendar and contact manager
  • mobile web browser
  • navigation system
  • music player (with video)
  • portable game system
  • stock tracker

and that’s just with the standard apps that come with the phone. With some additional (mostly free) apps, I’ve made my iPhone into a:

  • voice recorder
  • guitar tuner
  • metronome

How cool is it that one small device that fits in my pocket can do all those things? And with the iTunes app store, the sky’s the limit. 

Perhaps the coolest feature isn’t even on the list above because it’s hidden from view: whenever your iPhone 3G is in range of a wifi service, it will automatically try to use wifi, which will give you big performance boost over AT&T’s 3G data network.