My wife and I have recently been trying to build a simple game on the iPhone. Neither of us have tried to do any Mac development before, so it was a little bit of a challenge just working out where to start. Here’s some tips on where to go if you’re a beginner like us.
You will need:
- A computer running the latest version of OSX (like a Mac)
- XCode (the Apple IDE) installed on your OSX (This comes on the OSX install CDs, but not usually on the Mac itself)
- Some internet (such as the one you’re using to read this blog)
- An iPhone or iPod touch (although you can get quite far just using the simulator)
- The iPhone SDK. Once you install this, XCode will be able to create iPhone projects. It also comes with a simulator and all sorts of performance testing tools. You’ll need to register as an iPhone developer before you can download this (or a number of other things I’m linking to), but you don’t have to fork out $99 until you want to deploy your app to an iPhone.
Apple have 11 introductory videos available on the iPhone development homepage. The first few I would recommend as mandatory, the others you should watch if they look interesting.
These links will help you to learn Objective C (The language you’ll be developing in):
- Objective C in two pages
- Objective C in detail
- Stanford University’s own iPhone development course. The lecture notes (available for free) are excellent – and short.
One blog that I’ve found very useful is Mobile Orchard.
The most important thing that I recommend doing is downloading Apple’s sample code and stepping through that. Playing with some sample code and seeing what changes are effected was probably what taught us the most. There’s a gallery of UIElements to browse through the different controls that apple provide, as well as examples of using the more complex input hardware that the iPhone provides, like GPS and the accelerometers.
Please leave a comment if you’ve got any further suggestions – I’ll add them to the list!