Mike Ash wrote an entertaining and somewhat informative article on the iPhone development process. Unfortunately, some of the good, getting started info was left out. Since I just started developing for the iPhone, I thought it might be useful to someone if I itemized what to do and where to read how to do it.

First off, find a fast Internet connection and download the iPhone SDK. If you have the the standard OS X SDK, it appears you have to install the iPhone version after it. I upgraded to the latest OS X SDK and it appeared to have clobbered my iPhone installation such that I no longer had the option to create iPhone applications, so keep the iPhone SDK package nearby.

  1. As Mike mentioned, head on over to the Apple developer site and apply to the program. Really, you aren't applying, you are purchasing the right to access the features that allow you to actually test and deploy iPhone applications. No one actually reviews your application -- they just take your money. I already had a developer account, so I'm not sure if my approval arrived quickly or not.
  2. OK, login to you account after you receive the approval email address.
  3. In order to deploy your application to your device for testing, you need to visit the Program Portal to register your device, create a development certificate, an App ID (I have no idea why people capitalize Id since it is an abbreviation of one word, maybe it just looks less awkward...), and create provisioning profile. Apple provides some nice How To articles on the tab bar of each section.
  4. The How To directions for creating a certificate are pretty straight forward. After it is submitted it takes a few minutes to get an email telling you it is ready. I followed the installation instructions and added it to my login keychain, but this seems like a bad place to store it.
  5. As with certificates, adding a device is well explained in the How To.
  6. Adding an App ID is a little trickier. The name cannot have spaces, so just squish the words together. The Bundle Identifier gives you the choice of com.companyname.* and com.companyname.appname, the former allows you to share keychain access across multiple applications. In general, you probably want to chose the latter format.
  7. The provisioning process creates a profile that ties a developer, device, and application together. The XCode Organizer (Window -> Organizer) uses one or more profiles to create one or more build targets. Again, well documented in the How To. You have to save the profile and then drag it into the Provisioning window of the Organizer.

After completing these tasks, you can finally start developing! Test your setup by going through a tutorial like the excellent iPhone SDK Tutorial: Build a Simple RSS reader for the iPhone by Jason Terhorst. There's a missing closing brace in there, but otherwise it is pretty cut-n-paste.

A couple of gotchas I experienced:

  • If the Organizer is failing to install your application, disconnect and reconnect your iPhone, possibly rebooting it as well. The disconnect is definitely required.
  • To use the simulator instead of installing on your device after clicking Build & Go, select the appropriate simulator from the Project -> Set Active SDK menu.

Feel free to ask any questions, and definitely help me correct any errors!