In this book, bestselling author and iOS development guru Erica Sadun brings together all the information you need to quickly start building successful iOS apps for iPhone, iPad, and iPod touch. Sadun has thoroughly revised this book to focus on powerful new iOS 5 features, the latest version of Objective-C, and the Xcode 4 development tools.
""The iOS 5 Developer's Cookbook, Third Edition" "is packed with ready-made code solutions for the iOS 5 development challenges you're most likely to face, eliminating trial-and-error and helping you build reliable apps from the very beginning. Sadun teaches each new concept and technique through robust code that is easy to reuse and extend. This isn't just cut-and-paste: Using her examples, Sadun fully explains both the "how" and "why" of effective iOS 5 development.
Sadun's tested recipes address virtually every major area of iOS development, from user interface design to view controllers, gestures and touch, to networking and security. Every chapter groups related tasks together, so you can jump straight to your solution, without having to identify the right class or framework first. Coverage includes:
Mastering the iOS 5 SDK, Objective-C essentials, and the iOS development lifecycle Designing and customizing interfaces with Interface Builder and Objective-C Organizing apps with view controllers, views, and animations featuring the latest Page View controllers and custom containers Making the most of touch and gestures--including custom gesture recognizers Building and using controls from the ground up Working with Core Image and Core Text Implementing fully featured Table View edits, reordering, and custom cells Creating managed database stores; then adding, deleting, querying, and displaying data Alerting users with dialogs, progress bars, local and push notifications, popovers, and pings Requesting and using feedback Connecting to networks and services, handling authentication, and managing downloads Deploying apps to devices, testers, and the App Store
I suppose I shouldn't fault this book: its title says it's a cook-book, and that's what it is. After a rather long, often sententious, and (in my opinion) wrong-headed, introduction to programming in Objective C (I say wrong-headed because for no obvious reason the author seems to believe that instead of embracing the final arrival of automatic memory management, developers should carry on with the nightmarish mess that was memory management pre-ARC), you get an extended 'press this button, click that selector' introduction to interface-builder, and then a whole load of recipes. Now the recipes are not in themselves bad or useless. Except for a few points.
First, no effort is made to get you to explore beyond what happens in the recipe, so the author doesn't explain why she's done what she has, she doesn't discuss alternatives, or tell you what the classes she's using are capable of. So you end up knowing how to do what she showed you, but not knowing how to change it to be what you want. So, there's a whole chapter about ViewControllers, but the precise relationship between a NavigationController, a ViewController and a View are never properly explained. Second, and more important, she doesn't show the context in which her recipes sit. For example, one recipe involves building a stack of views on an iPhone screen, with forward and backward buttons. The code shows us how to get from window n to window n+1 and back again. But - it doesn't show us how the application gets to window 1 in the first place. With any large-scale graphical framework, be it Cocoa or X-Windows, getting the whole thing up and running is often the hardest part. Now, I believe you can download the complete code for the recipes, but not explaining how to initialise code is inexcusable.
Stepping back, the book makes no real effort to instill understanding. As I said, there is a complex relationship between Apps, Navigation Controllers, View Controllers and Views, but that is never made explicit. And the chapter on Core Data is simply woeful: instead of trying to explain how it does object-relational mapping, it simply tells you how to click on XCode to make pictures. This is symptomatic of the basic problem with the book: it does not teach you how to use Cocoa to build an App for iOS5: it shows you some neat tricks that you could use if you already knew what you were doing. As such, this will remain on my book-shelf (unlike the woefully awful book from O'Reilly), but it certainly won't be my first reference.
4.5 This is one of those times when I dearly wish there were 1/2-star ratings - it's not perfect, but is very likely as close as anything with this breadth and reasonable depth will ever be. This will not hold your hand and walk you through design and construction of a complete application; it offers precisely what the title spells out. About 1100 pages worth (the print edition is only the first 15 chapters - there are 9 more only in electronic format, available for a few dollars as a supplement) of content, covering probably about 80% of what I might have hoped for. If you want a tutorial, or an exploration of Cocoa frameworks or Core Data, look elsewhere.
She is not hesitant to point out Apple's shortcomings and how to approach these, nor to point you cheerfully to other authors regardless of publisher, as well as other resources. ARC is a wonderful advance, but chances are you'll need to bridge the two worlds, so she immediately addresses that. She wisely does not attempt to be all-encompassing, pointing out time and again that there are publishing constraints and cannot do justice to some topics - her goal is to introduce concepts, show you the path forward, point out common pitfalls and share useful techniques. In this she succeeds admirably. If you haven't been inspired by possibilities, if your creative juices aren't flowing as you make your way through this tome, well... you're simply doing it wrong.
This book was informative in obtaining a broad overview of the various frameworks and libraries that the iOS SDK provides. While some of the examples used practices I find suspect, the modal alert for example, and other examples seem contrived, such as the recipe to write text onto paths, this may simply be the nature of a recipe-style book.
Thus take with a grain of salt, and a mindfulness that prohibits wholesale copying of the code, this book is an informative and a comprehensive view of the iOS SDK.
Really great book and a good complement to the Big Nerd Ranch book on iOS Programming.
This book does assume that you are familiar with at least C programming and Objective-C, and while it does have a quick overview of Xcode, I recommend the Big Nerd Ranch books, on Objective-C and iOS programming before this one. See my reviews of those books for more detail.