iPhone Developer's Cookbook, The
Home > Computing and Information Technology > Digital Lifestyle and online world: consumer and user guides > Mobile phones and smartphones: consumer / user guides > iPhone Developer's Cookbook, The: Building Applications with the iPhone 3.0 SDK(Developer's Library)
iPhone Developer's Cookbook, The: Building Applications with the iPhone 3.0 SDK(Developer's Library)

iPhone Developer's Cookbook, The: Building Applications with the iPhone 3.0 SDK(Developer's Library)


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
About the Book

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!

Table of Contents:
Preface xix 1 Introducing the iPhone SDK 1 iPhone Developer Programs 1 Getting Started 3 Understanding Model Differences 7 Platform Limitations 9 SDK Limitations 12 Using the Developer Portal 13 Assembling iPhone Projects 17 iPhone Application Components 22 Programming Paradigms 28 Summary 35 2 Building Your First Project 37 Creating New Projects 37 Building Hello World the Template Way 39 Using the Simulator 46 The Minimalist Hello World 48 Using the Debugger 53 Memory Management 58 Recipe: Using Instruments to Detect Leaks 59 Recipe: Using Instruments to Monitor Cached Object Allocations 62 Using the Clang Static Analyzer 64 Building for the iPhone 65 From Xcode to Your iPhone: The Organizer Interface 69 Using Compiler Directives 73 Building for Distribution 78 Clean Builds 80 Building for Ad Hoc Distribution 83 Customizing Xcode Identities 85 Creating Custom Xcode Templates 86 One More Thing: Viewing Side-by-Side Code 88 Summary 89 3 Objective-C Boot Camp 91 The Objective-C Programming Language 91 Classes and Objects 92 Methods, Messages, and Selectors 95 Class Hierarchy 102 Logging Information 103 Properties 105 Simple Memory Management 110 Crafting Singletons 119 Categories (Extending Classes) 120 Protocols 122 Foundation Classes 125 One More Thing: Message Forwarding 138 Summary 141 4 Designing Interfaces 143 UIView and UIWindow 143 UIViewControllers 147 View Design Geometry 151 Building Interfaces 155 Walk-Through: Building a Temperature Converter with IB 156 Walk-Through: Building a Converter Interface by Hand 166 Walk-Through: Creating a Hybrid Converter 169 Walk-Through: Loading .xib Files Directly from Code 173 Designing for Rotation 174 Enabling Reorientation 175 Autosizing 176 Moving Views 179 Swapping Views 183 One More Thing: A Half Dozen Great Interface Builder Tips 184 Summary 186 5 Working with View Controllers 187 Developing with Navigation Controllers 187 Utility Function 190 Recipe: Building a Simple Two-Item Menu 192 Recipe: Adding a Segmented Control 193 Recipe: Navigating Between View Controllers 195 Recipe: Using Creative Popping Options 197 Recipe: Presenting a Custom Modal Information View 199 Recipe: Tab Bars 201 Recipe: Remembering Tab State 204 One More Thing: Interface Builder and Tab Bar Controllers 207 Summary 208 6 Assembling Views and Animations 211 View Hierarchies 211 Recipe: Recovering a View Hierarchy Tree 213 Recipe: Querying Subviews 214 Managing Subviews 215 Recipe: Tagging and Retrieving Views 217 Recipe: Naming Views 219 View Geometry 222 Recipe: Working with View Frames 224 Recipe: Randomly Moving a Bounded View 231 Recipe: Transforming Views 232 Display and Interaction Traits 235 UIView Animations 236 Recipe: Fading a View In and Out 237 Recipe: Swapping Views 239 Recipe: Flipping Views 240 Recipe: Using Core Animation Transitions 242 Recipe: General Core Animation Calls 244 Curl Transitions 246 Recipe: Bouncing Views as They Appear 248 Recipe: Image View Animations 250 One More Thing: Adding Reflections to Views 251 Summary 255 7 Working with Images 257 Recipe: Finding and Loading Images 257 Recipe: Accessing Photos from the iPhone Photo Album 262 Recipe: Selecting and Customizing Images from the Camera Roll 265 Recipe: Snapping Photos and Writing Them to the Photo Album 268 Recipe: Saving Pictures to the Documents Folder 270 Recipe: E-Mailing Pictures 272 Recipe: Capturing Time Lapse Photos 273 Recipe: Using a Custom Camera Overlay 275 Recipe: Displaying Images in a Scrollable View 278 Recipe: Creating a Multiimage Paged Scroll 280 Recipe: Creating New Images from Scratch 281 Recipe: Building Thumbnails from Images 285 Fixing Photo Orientation 288 Taking Screenshots 290 Recipe: Working Directly with Bitmaps 291 One More Thing: Going Grayscale 298 Summary 299 8 Gestures and Touches 301 Touches 301 Recipe: Adding a Simple Direct Manipulation Interface 304 Recipe: Constraining Movement 305 Recipe: Testing Touches 307 Recipe: Testing Against a Bitmap 309 Recipe: Adding Persistence to Direct Manipulation Interfaces 311 Recipe: Persistence Through Archiving 314 Recipe: Adding Undo Support 316 Recipe: Adding Shake-Controlled Undo Support 319 Recipe: Drawing Onscreen 321 Recipe: Calculating Lines 323 Recipe: Detecting Circles 325 Recipe: Detecting Multitouch 327 Recipe: Gesture Distinction 329 One More Thing: Interactive Resize and Rotation 333 Summary 338 9 Building and Using Controls 341 The UIControl Class 341 Buttons 344 Adding Buttons in Interface Builder 345 Building Custom Buttons in Xcode 348 Multiline Button Text 351 Adding Animated Elements to Buttons 351 Recipe: Animating Button Responses 352 Recipe: Working with Switches 354 Recipe: Adding Custom Slider Thumbs 356 Recipe: Creating a Twice-Tappable Segmented Control 362 Recipe: Subclassing UIControl 363 Recipe: Dismissing a UITextField Keyboard 366 Recipe: Dismissing UITextView Keyboards 370 Recipe: Building a Better Text Editor 371 Recipe: Text Entry Filtering 374 Recipe: Adding a Page Indicator Control 376 Recipe: Creating a Customizable Paged Scroller 379 Building a Toolbar 384 One More Thing: Smart Labels 387 Summary 388 10 Alerting Users 391 Talking Directly to Your User Through Alerts 391 Recipe: No-Button Alerts 394 Recipe: Creating Modal Alerts with Run Loops 396 Recipe: Soliciting Text Input from the User 399 Recipe: Using Variadic Arguments with Alert Views 402 Recipe: Presenting Simple Menus 403 Recipe: Displaying Text in Action Sheets 405 “Please Wait”: Showing Progress to Your User 406 Recipe: Building a UIProgressView 407 Recipe: Building Custom Overlays 409 Recipe: Tappable Overlays 411 Recipe: Orientable Scroll-Down Alerts 412 Recipe: Using the Network Activity Indicator 415 Recipe: Badging Applications 416 Recipe: Simple Audio Alerts 417 One More Thing: Showing the Volume Alert 420 Summary 421 11 Creating and Managing Table Views 423 Introducing UITableView and UITableViewController 423 Recipe: Implementing a Very Basic Table 426 Recipe: Changing a Table’s Background Color 430 Recipe: Creating a Table Image Backsplash 432 Recipe: Exploring Cell Types 433 Recipe: Building Custom Cells in Interface Builder 435 Recipe: Alternating Cell Colors 439 Recipe: Building a Custom Cell with Built-In Controls 441 Recipe: Remembering Control State for Custom Cells 443 Recipe: Creating Checked Table Cells 446 Recipe: Removing Selection Highlights from Cells 448 Recipe: Working with Disclosure Accessories 449 Recipe: Deleting Cells 451 Recipe: Reordering Cells 456 Recipe: Adding Undo Support to a Table 457 Recipe: Sorting Tables 462 Recipe: Searching Through a Table 464 Recipe: Working with Sections 467 Recipe: Creating Grouped Tables 473 Recipe: Customizing Headers and Footers 474 Recipe: Creating a Group Table with Many Cell Types and Heights 477 Recipe: Building a Multiwheel Table 480 Recipe: Using a View-Based Picker 484 Recipe: Using the UIDatePicker 487 One More Thing: Formatting Dates 490 Summary 493 12 Making Connections with GameKit and Bonjour 495 Recipe: Creating Basic GameKit Services 495 Recipe: Peeking Behind the Scenes 509 Recipe: Sending Complex Data Through GameKit 510 Recipe: GameKit Voice Chat 512 Recipe: Using Bonjour to Create an iPhone Server 515 Recipe: Creating a Mac Client for an iPhone Bonjour Service 520 Recipe: Working Around Real-World GameKit Limitations 523 Recipe: iPhone to iPhone Gaming Via BonjourHelper 528 Creating an “Online” GameKit Connection 537 One More Thing: Scanning for Services 540 Summary 543 13 Networking 545 Recipe: Checking Your Network Status 545 Recipe: Extending the UIDevice Class for Reachability 547 Recipe: Scanning for Connectivity Changes 549 Recipe: Recovering IP and Host Information 552 Recipe: Checking Site Availability 555 Recipe: Synchronous Downloads 557 Recipe: Asynchronous Downloads 560 Recipe: Handling Authentication Challenges 565 Recipe: Using the Keychain to Store Sensitive Data 566 Recipe: Uploading Via POST 569 Recipe: Uploading Data 572 Recipe: Sharing Keychains Between Applications 575 Recipe: Converting XML into Trees 577 Recipe: Building a Simple Web-Based Server 582 One More Thing: FTPHelper 586 Summary 588 14 Device Capabilities 589 Recipe: Accessing Core Device Information 589 Adding Device Capability Restrictions 590 Recipe: Recovering Additional Device Information 592 Recipe: Monitoring the iPhone Battery State 594 Recipe: Enabling and Disabling the Proximity Sensor 596 Recipe: Using Acceleration to Locate “Up” 597 Recipe: Using Acceleration to Move Onscreen Objects 599 Recipe: Detecting Device Orientation 601 Recipe: Detecting Shakes Using Motion Events 603 Recipe: Detecting Shakes Directly from the Accelerometer 605 One More Thing: Checking for Available Disk Space 608 Summary 609 15 Audio, Video, and MediaKit 611 Recipe: Playing Audio with AVAudioPlayer 611 Recipe: Looping Audio 618 Recipe: Handling Audio Interruptions 621 Recipe: Audio That Ignores Sleep 622 Recipe: Recording Audio 624 Recipe: Recording Audio with Audio Queues 629 Recipe: Playing Video with the Media Player 634 Recipe: Recording Video 636 Recipe: Picking and Editing Video 639 Recipe: Picking Audio with the MPMediaPickerController 641 Creating a Media Query 645 Recipe: Using the MPMusicPlayerController 649 One More Thing: Additional Movie Player Properties 653 Summary 653 16 Push Notifications 655 Introducing Push Notifications 655 Provisioning Push 659 Registering Your Application 662 Recipe: Push Client Skeleton 667 Building Notification Payloads 672 Recipe: Sending Notifications 676 Recipe: Push in Action 681 Feedback Service 685 Designing for Push 686 Summary 687 17 Using Core Location and MapKit 689 How Core Location Works 689 Recipe: Core Location in a Nutshell 691 Recipe: Tracking Speed 695 Recipe: Computing Speed and Distance 696 Recipe: Keeping Track of “North” by Using Heading Values 698 Recipe: Reverse Geocoding 700 Recipe: Viewing a Location 703 Recipe: User Location Annotations 707 Recipe: Creating Map Annotations 709 One More Thing: Geocoding 717 Summary 721 18 Connecting to the Address Book 723 Recipe: Working with the Address Book 723 Recipe: Searching the Address Book 738 Recipe: Accessing Image Data 741 Recipe: Picking People 742 Recipe: Limiting Contact Picker Properties 745 Recipe: Adding New Contacts 747 Recipe: Modifying Existing Contacts 748 Recipe: The ABUnknownPersonViewController 750 One More Thing: Adding Random Contact Art 752 Summary 755 19 A Taste of Core Data 757 Introducing Core Data 757 Recipe: Using Core Data for a Table Data Source 767 Recipe: Search Tables and Core Data 770 Recipe: Integrating Core Data Tables with Live Data Edits 773 Recipe: Implementing Undo-Redo Support with Core Data 775 Summary 778 20 StoreKit: In-App Purchasing 779 Getting Started with StoreKit 779 Creating Test Accounts 781 Creating New In-App Purchase Items 782 Submitting the Application 787 Building a GUI 787 Purchasing Items 789 Validating Receipts 794 Summary 797 21 Accessibility and Other iPhone OS Services 799 Adding VoiceOver Accessibility to Your Apps 799 Recipe: Adding Custom Settings Bundles 806 Recipe: Creating URL-Based Services 814 Summary 819 A Info.plist Keys 821 Index 825

About the Author :
Erica Sadun is the bestselling author, coauthor, and contributor to three dozen books on programming, digital media, Web design, and other topics–including the bestselling first edition of this book. She has created more than a dozen native iPhone applications and was among the first to blog knowledgeably about iPhone programming. Sadun holds a Ph.D. in Computer Science from Georgia Tech’s renowned Graphics, Visualization, and Usability Center.


Best Sellers


Product Details
  • ISBN-13: 9780321670137
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison-Wesley Educational Publishers Inc
  • Language: English
  • Series Title: Developer's Library
  • ISBN-10: 0321670132
  • Publisher Date: 24 May 2011
  • Binding: Digital download
  • No of Pages: 889
  • Sub Title: Building Applications with the iPhone 3.0 SDK


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
iPhone Developer's Cookbook, The: Building Applications with the iPhone 3.0 SDK(Developer's Library)
Pearson Education (US) -
iPhone Developer's Cookbook, The: Building Applications with the iPhone 3.0 SDK(Developer's Library)
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

iPhone Developer's Cookbook, The: Building Applications with the iPhone 3.0 SDK(Developer's Library)

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!