The IOS 5 Developer's Cookbook

by Erica Sadun

Published 4 January 2010

"This book would be a bargain at ten times its price! If you are writing iPhone software, it will save you weeks of development time. Erica has included dozens of crisp and clear examples illustrating essential iPhone development techniques and many others that show special effects going way beyond Apple's official documentation."

-Tim Burks, iPhone Software Developer, TootSweet Software

"Erica Sadun's technical expertise lives up to the Addison-Wesley name. The iPhone Developer's Cookbook is a comprehensive walkthrough of iPhone development that will help anyone out, from beginners to more experienced developers. Code samples and screenshots help punctuate the numerous tips and tricks in this book."

-Jacqui Cheng, Associate Editor, Ars Technica

"We make our living writing this stuff and yet I am humbled by Erica's command of her subject matter and the way she presents the material: pleasantly informal, then very appropriately detailed technically. This is a going to be the Petzold book for iPhone developers."

-Daniel Pasco, Lead Developer and CEO, Black Pixel Luminance

"The iPhone Developer's Cookbook should be the first resource for the beginning iPhone programmer, and is the best supplemental material to Apple's own documentation."

-Alex C. Schaefer, Lead Programmer, ApolloIM, iPhone Application Development Specialist, MeLLmo, Inc.

"Erica's book is a truly great resource for Cocoa Touch developers. This book goes far beyond the documentation on Apple's Web site, and she includes methods that give the developer a deeper understanding of the iPhone OS, by letting them glimpse at what's going on behind the scenes on this incredible mobile platform."

-John Zorko, Sr. Software Engineer, Mobile Devices

"I've found this book to be an invaluable resource for those times when I need to quickly grasp a new concept and walk away with a working block of code. Erica has an impressive knowledge of the iPhone platform, is a master at describing technical information, and provides a compendium of excellent code examples."

-John Muchow, 3 Sixty Software, LLC; founder, iPhoneDeveloperTips.com

"This book is the most complete guide if you want coding for the iPhone, covering from the basics to the newest and coolest technologies. I built several applications in the past, but I still learned a huge amount from this book. It is a must-have for every iPhone developer."

-Roberto Gamboni, Software Engineer, AT&T Interactive

"It's rare that developer cookbooks can both provide good recipes and solid discussion of fundamental techniques, but Erica Sadun's book manages to do both very well."

-Jeremy McNally, Developer, entp

Want to get started building applications for Apple's iPhone and iPod touch? Already building iPhone applications and want to get better at it? This is the only book that brings together all the expert guidance-and the code-you'll need!

Completely revised and expanded to cover the iPhone 3.0 SDK, The iPhone Developer's Cookbook is the essential resource for developers building apps for the iPhone and iPod touch. Taking you further than before, this new edition starts out with an introduction to Objective-C 2.0 for developers who might be new to the platform. You'll learn about Xcode and Interface Builder and learn how to set up and configure your iPhone Developer account. Additional highlights of this new edition include:

Using the iPhone SDK's visual classes and controllers to design and customize interfaces

Using gestures, touches, and other sophisticated iPhone interface capabilities

Making the most of tables, views, view controllers, and animations

Alerting users with progress bars, audio pings, status bar updates, and other indicators

Using new Push Notifications to send alerts, whether your app is running or not

Playing audio and video with the MediaKit

Working with the Address Book, Core Location, and Sensors

Connecting to the Internet, Web services, and networks

Embedding flexible maps with MapKit and Google Mobile Maps

Building multiplayer games with GameKit

Using Core Data to build data-driven applications

Selling add-on content and services with In-App Purchasing using StoreKit

Building accessible apps with Accessibility Plus

The unique format of The iPhone Developer's Cookbook presents the code you need to create feature-rich applications that leverage the latest features of the iPhone 3.0 SDK. Over 30,000 iPhone developers turned to the first edition of The iPhone Developer's Cookbook. So should you!


The iPhone Developer's Cookbook

by Erica Sadun

Published 23 October 2008

“This book would be a bargain at ten times its price! If you are writing iPhone software, it will save you weeks of development time. Erica has included dozens of crisp and clear examples illustrating essential iPhone development techniques and many others that show special effects going way beyond Apple’s official documentation.”

—Tim Burks, iPhone Software Developer, TootSweet Software

 

“Erica Sadun’s technical expertise lives up to the Addison-Wesley name. The iPhone Developer’s Cookbook is a comprehensive walkthrough of iPhone development that will help anyone out, from beginners to more experienced developers. Code samples and screenshots help punctuate the numerous tips and tricks in this book.”

—Jacqui Cheng, Associate Editor, Ars Technica

 

“We make our living writing this stuff and yet I am humbled by Erica’s command of her subject matter and the way she presents the material: pleasantly informal, then very appropriately detailed technically. This is a going to be the Petzold book for iPhone developers.”

—Daniel Pasco, Lead Developer and CEO, Black Pixel Luminance

 

The iPhone Developer’s Cookbook: Building Applications with the iPhone SDK should be the first resource for the beginning iPhone programmer, and is the best supplemental material to Apple’s own documentation.”

—Alex C. Schaefer, Lead Programmer, ApolloIM, iPhone Application Development Specialist, MeLLmo, Inc

 

“Erica’s book is a truly great resource for Cocoa Touch developers. This book goes far beyond the documentation on Apple’s Web site, and she includes methods that give the developer a deeper understanding of the iPhone OS, by letting them glimpse at what’s going on behind the scenes on this incredible mobile platform.”

—John Zorko, Sr. Software Engineer, Mobile Devices

 

The iPhone and iPod touch aren’t just attracting millions of new users; their breakthrough development platform enables programmers to build tomorrow’s killer applications. If you’re getting started with iPhone programming, this book brings together tested, ready-to-use code for hundreds of the challenges you’re most likely to encounter. Use this fully documented, easy-to-customize code to get productive fast—and focus your time on the specifics of your application, not boilerplate tasks.

 

Leading iPhone developer Erica Sadun begins by exploring the iPhone delivery platform and SDK, helping you set up your development environment, and showing how iPhone applications are constructed. Next, she offers single-task recipes for the full spectrum of iPhone/iPod touch programming jobs:

  • Utilize views and tables
  • Organize interface elements
  • Alert and respond to users
  • Access the Address Book (people), Core Location (places), and Sensors (things)
  • Connect to the Internet and Web services
  • Display media content
  • Create secure Keychain entries
  • And much more

 

You’ll even discover how to use Cover Flow to create gorgeous visual selection experiences that put scrolling lists to shame!

 

This book is organized for fast access: related tasks are grouped together, and you can jump directly to the right solution, even if you don’t know which class or framework to use. All code is based on Apple’s publicly released iPhone SDK, not a beta. No matter what iPhone projects come your way, The iPhone Developer’s Cookbook will be your indispensable companion.

 


The Advanced iOS 6 Developer's Cookbook brings together reliable, proven solutions for cutting-edge iOS 6 development. World-renowned iOS expert Erica Sadun covers device-specific development, document/data sharing, Core Text, networking, image processing, onboard cameras, audio, Address Book, Core Location, GameKit,StoreKit, push notifications, and more.

As in her previous bestselling iOS books, Sadun translates today's development best practices into working code, distilling key concepts into concise recipes that are easy to understand and transfer into your own projects. This isn't just cut and paste. Using her examples, Sadun fully explains both the "how" and "why" of advanced and specialized iOS 6 development.

All code is tested with iOS 6 features and iPhone, iPad, and iPod touch capabilities. Throughout, 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

Testing device properties so your app can take full advantage of the iOS unit it's running onSeamlessly sharing documents and data across apps and moving control between appsPresenting exceptionally attractive text with freeform text typesettingBuilding touch-based apps that leverage Bezier curves, splines, and other geometric toolsSecuring network apps via authentication, system keychains, and OAuthAccessing and processing image data to create special effectsIntegrating live camera feeds and user snapshotsPresenting audio to users and enabling them to interact with itEffectively using Address Book frameworks and GUI classesBuilding advanced location apps with Core Location geopositioning and MapKitCreating connected game play with GameKit/Game Center: device-to-device networking, shared leaderboards, and Internet-based matchesIntegrating secure in-app purchasing with StoreKitCommunicating with users from web-based services via push notifications

The best place to start iOS application development

The Core iOS Developer’s Cookbook provides ready-to-use code solutions for common iOS challenges, providing recipes that help you master the core technology at the heart of iOS. Renowned iOS programming expert Erica Sadun and top iOS developer Rich Wardwell cover the topics you need to create successful mobile applications that take full advantage of iOS graphics, touches, and views.

As in all of Sadun’s iOS bestsellers, The Core iOS Developer’s Cookbook translates modern best practices into working code, distilling key concepts into concise recipes you can easily understand and apply to your own projects. This isn’t just cut-and-paste; using examples, Sadun and Wardwell fully explain both the “how” and “why” that underscore effective and successful iOS development.

Coverage includes
  • Creating direct touch-based interfaces with multi-touch, gestures, and custom gesture recognizers
  • Building and customizing controls in powerful ways
  • Adding novel motion effects
  • Alerting users via pop-ups, progress bars, local notifications, popovers, audio cues, and more
  • Using Xcode modules to easily integrate system frameworks and headers
  • Assembling views and animation, organizing view hierarchies, and understanding how views work together
  • Supporting multiple screen geometries with the breakthrough Auto Layout constraints system
  • Controlling keyboards, making onscreen elements “text aware,” and efficiently scanning and formatting text
  • Organizing user workspaces with view controllers
  • Managing photos, videos, email, and text messages
  • Leveraging enhanced iOS support for social media activities, including Flickr and Vimeo
  • Implementing VoiceOver accessibility, including text-to-speech
  • Getting started with Core Data-managed data stores
  • Leveraging powerful networking and web services support
  • Using APIs to enhance the user experience