In April 2010 Apple launched the iPad: the first tablet computer that was embraced by a large audience around the world. The moment I saw the keynote video where Steve Jobs introduced the iPad, I knew this device was going to be a big hit. I knew I wanted one. And I would have to wait until July before I could get my hands on one myself.
A few weeks after that keynote I also knew something else: that I would love to be able to develop apps for the iPad. After doing some research and visiting a seminar on mobile application development I realized that there was an awful lot to learn. First I would have to learn a programming language that was totally new to me: Objective-C. Then I would have to dive into the iPhone SDK and learn how to work with Xcode, Apple’s development tool.
Before I started this adventure I did some research into books on iPhone development and Objective-C to get me going. This was not so easy because the available books get very mixed reviews on the Internet and online bookstores like Amazon.com. And because I have quite a lot of programming experience already, I did not want to start at the very bottom, so the level of the books should not be too easy. Several months later, I think I can give you some solid advice on which books to check out which got me going and helped me out a lot during the process of getting to know the iPhone SDK. So off we go!
#1: Programming in Objective-C 2.0 (2nd Edition)
Without knowledge of Objective-C you’ll have a hard time developing anything for the iPad, iPhone or iPod Touch. So the first book I picked up was Programming in Objective-C 2.0 (2nd Edition) by Stephen G. Kochan. The book looks and reads a student textbook. Every chapter ends with a number of exercises which are recommended to try out if you want to make sure that you understand the material that was discussed in a specific chapter.
On one hand the material is very dry, but on the other hand it is explained very thorough with lots of examples, attention for detail and for memory management (yes guys, no garbage collection on the iPhone). The author spends a lot of time not only telling you how to do things, but also how not to do things. This will help you avoid the various pitfalls of the Objective-C language.
#2: Cocoa® Programming for Mac® OS X (3rd Edition)
When you think you got a hold of Objective-C, it is time to start learning Cocoa Touch, which is the mobile version of the Cocoa framework that you will use to construct your iPhone or iPad apps. If you really can’t wait to start fiddling with the iPhone SDK, you could skip Cocoa® Programming for Mac® OS X (3rd Edition) by Aaron Hillegass. Nevertheless, this book contains a lot of valuable information on the Cocoa framework that is also valid for the Cocoa Touch framework. Furthermore it contains a brief history of the Mac platform (from NeXTSTEP to Mac OS X) and a more detailed explanation of subjects like Key-Value Coding and Key-Value Observing, helper objects, archiving, the undo manager and Core Data than book #3 that I will discuss next.
My advice: if you can afford the time and money, get this book and read the first 10 or 11 chapters before you start with…
#3: Beginning iPhone Development: Exploring the iPhone SDK
This book will really get you going with the iPhone SDK. All the important components of the Cocoa Touch framework are discussed in Beginning iPhone 3 Development: Exploring the iPhone SDK by Dave Mark and Jeff LaMarche. You’ll learn to work with all the standard controls like buttons, sliders, text fields, the virtual keyboard and also with the more complicated controls like tab bars, pickers, navigation controllers, table views, working with gestures and multi-touch, the iPhone camera and photo library, localization of your apps, and much more.
The book is highly accessible and a good read. The authors expect that you already have some knowledge of the Objective-C language though, so reading up on the language is preferred, for example by picking up book #1 in this post.
I found the samples in this book very useful and return to them a lot when writing my own code. You will also learn to work with the Model-View-Controller paradigm, which is essential if you want to setup your application correctly and keep it maintainable.
Note: at the time of writing, the follow-up to this book called Beginning iPhone 4 Development: Exploring the iOS SDK is available for pre-order.
#4: The iPhone Developer’s Cookbook (2nd Edition)
The iPhone Developer’s Cookbook (2nd Edition) by Erica Sadun is a book for the more experienced iPhone programmer. With over 850 pages it contains a massive amount of information. If you are starting fresh developing with the iPhone SDK, you might want to hold off reading this book and first pick up book #3 I discussed earlier in this blog post.
This does not mean that this is not a good book. On the contrary I would say! I consider this book as a must-have for every serious iPad and iPhone developer as it contains tons of recipes, showing iPhone programming techniques, components and special effects that you will find in many popular iPhone apps in the App Store.
Note: make sure you get the second edition of The iPhone Developer’s Cookbook. This edition has almost twice as many pages including a primer on Objective-C and lots of tips on debugging, memory management and tools for analyzing your source code for problems.
Is That All I Need?
Well… No, not really. Don’t get me wrong: the books discussed in this post will get you on track and give you a very thorough introduction and a useful reference when developing with the iPhone SDK. After a while you will notice that you are querying the Apple documentation a lot to get to learn the more details of the components you need and want to use in your own apps. This documentation covers everything there is to know about Objective-C and Cocoa (Touch) and is immensely big.
And if that also fails to give you the information you need, there is always your biggest friend on the Internet: Google.