Best Books for iPhone Development

Dec 2010: Best books for iPhone Development is updated and expanded here. Some brilliant iPhone developer books are out now which are great for learning iPhone native app and web development, and handy references for existing Cocoa Touch experts. In this article I review several titles and give you my pick of the best for learning the native SDK and Objective-C programming:

iPhone in Action

iPhone in Action has very broad coverage of developing for the iPhone, and it introduces everything you need to know. The first third of the book covers web stuff - both how to revamp your existing website so it works great on both the desktop and iPhone, and also how to create iPhone specific web apps. Topics include design, CSS, iUI (the awesome library to make native looking web apps), graphics with webkit canvas, Dashcode, and debugging tips. The middle third of the book gets you started with native SDK development, starting with an overview of Objective-C and XCode, and then on to lots of good step by step tutorials for learning how to use Interface Builder and the different kinds of view controllers to create your GUI. The final third is an intro to important SDK programming topics including graphics, web interaction, SQLite databases, using the address book, etc. The book is invaluable for beginners because it shows you all the possibilities of both web and SDK and it introduces all the key topics - something no other single title does. Experts will want this title too for the detailed web development topics.

Beginning iPhone Development - Exploring the iPhone SDK

This fantastic book is an APress title, I don’t know how they do it but APress has great authors and every APress book I get is a home run. The book explains how to use the Cocoa SDK to write iPhone apps in very clear easy to digest steps. It has a lot more detail and an easier pace than ‘iPhone in Action’. View controllers are the most important part of the SDK to get to grips with, and they are the hardest to figure out. In this title we get 200 delicious pages devoted to them, compared to just 60 in ‘iPhone in Action’. ‘Beginning iPhone Development’ only covers the SDK and Interface Builder, so it has room for some useful SDK topics you won’t find written about elsewhere like UI’s that rotate to landscape mode and localization for different countries. This is the best book for learning native iPhone development.

Learn Objective-C on the Mac

Also on APress, this is _the_ book for learning and mastering Objective-C. Great writing, very easy to understand, and excellent as both a tutorial and reference. The authors assume you already know a little C syntax (from C, C++, Java, etc), so this is the key text for switchers. Still not figured out memory management retain counts and auto-release pools? Protocols, categories and inheritance a mystery? It’s all in this book. Recommended for all iPhone developers.

The iPhone Developer’s Cookbook

A great collection of recipes for using the SDK in the form ‘how to make my iPhone app do X’ format. These programming nuggets are lying on the page waiting for you to pinch ‘em and drop right into your own apps saving lots of time and giving you some great new ideas. Beginners and experts alike will learn many new tricks, everything is explained with clarity and brevity. For example after just 1 hour with this book I realized that my own app had buggy table views that I was able to easily fix using recipes from the book. Some of the recipes even mention undocumented APIs that allow neat UI details you’ve seen in Apple’s apps but otherwise couldn’t figure out how to do. This book should stay by any iPhone developers side.

...and a few more

Here are some additional books you might find helpful

‘Learn C on the Mac’. If you’ve never programmed any C or C++ you might also want to check out this book, also on Apress. Some iPhone programming is done with are pure C APIs, eg SQLite, Quartz 2D Graphics, OpenGL, and there's also a lot of use of C structs throughout Cocoa. To use these you’ll have to get your C pointers syntax right, and of course Objective-C is a super set of C anyway, so brush up your C.

Programming in Objective-C. This comprehensive reference covers  everything about the language, both the C and Objective-C parts.

Cocoa Programming for Mac OS X (third edition), Aaron Hillegass. OK, this isn’t an iPhone book, its a Mac programming book, and this is the book I learned Cocoa and Objective-C from before all the iPhone books came out! There’s a lot in common between iPhone development and Mac development, so if you are confused and want to read the basics explained with a different voice, this is somewhere you can turn. Let’s hope the author comes out with an iPhone version.

XCode Unleashed Fritz Anderson. New to Apple development means new to XCode, so if you want a book to help you make XCode bend to your will, this is where to turn. While you might not want to read 500 pages about an IDE, its good to have as a  reference, for learning a few productivity tricks, and it includes lots of information on debugging, Shark and Instruments, source code control, unit testing, documenting your code, etc.

Apple’s Documentation. Of course you don’t need a review of Apple’s extensive and free documentation because you already read it all right? No? You got lost and gave up once you started trying to write your app? (I did at first.) With one or all of the books above to get you going, dip back into Apple's excellent documentation for lots more gory detail. Once you've got the hang of  Cocoa and Objective-C you'll see that Apples documentation is excellent, and you'll be hitting command-option-shift-/ all the time in XCode. As well as all the API documentation, pay special attention to the Human Interface Guidelines, breaking these guidelines can get your app rejected.