𝔖 Scriptorium
✦   LIBER   ✦

📁

More iPhone 3 Development: Tackling iPhone SDK 3 (Beginning)

✍ Scribed by Dave Mark, Jeff LaMarche


Publisher
Apress
Year
2009
Tongue
English
Leaves
578
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Interested in iPhone development? Want to learn more? Whether you’re a self-taught iPhone development genius or have just made your way through the pages of Beginning iPhone 3 Development, we have the perfect book for you. More iPhone 3 Development: Tackling iPhone SDK 3 digs deeper into Apple’s latest SDK. Best-selling authors Dave Mark and Jeff LaMarche explain concepts as only they can, covering topics like Core Data, peer-to-peer networking using GameKit and network streams, working with data from the web, MapKit, in-application e-mail, and more. All the concepts and APIs are clearly presented with code snippets you can customize and use, as you like, in your own apps. If you are going to write a professional iPhone app, you’ll want to get your arms around Core Data, and there’s no better place to do so than in the pages of this book. The book continues right where Beginning iPhone 3 Development left off with a series of chapters devoted to Core Data, the standard for persistence that Apple introduced to iPhone with SDK 3. Jeff and Dave carefully step through each of the Core Data concepts and show you techniques and tips specifically for writing larger applications—offering a breadth of coverage you won't find anywhere else. The Core Data coverage alone is worth the price of admission. But there's so much more. This book covers a variety of networking mechanisms, from GameKit’s relatively simple BlueTooth peer-to-peer model, to the addition of Bonjour discovery and network streams, through the complexity of accessing files via the web. Dave and Jeff will also take you through coverage of concurrent programming and some advanced techniques for debugging your applications. Whether you are a relative newcomer to iPhone development or an old hand looking to expand your horizons, there’s something for everyone in More iPhone 3 Development. Note: A few of the apps in this book demonstrate technologies not yet supported by the simulator. To run them on your iPhone or iPod touch, you'll need to join one of Apple's paid iPhone developer programs. What you’ll learn All about Core Data: key concepts and techniques for writing larger application How to utilize a variety of networking mechanisms, including peer-to-peer connections over Bluetooth using GameKit Details on the addition of Bonjour discovery and network streams How to embed maps with Map Kit and use in-application email How to access a user's iPod library and integrate music into applications Essentials of concurrent programming and advanced debugging techniques Tips on working with data from the web Who this book is for All iPhone and iPod touch developers, especially developers already familiar with early iPhone SDKs. Table of Contents Here We Go Round Again The Anatomy of Core Data A Super Start: Adding, Displaying, and Deleting Data The Devil in the Detail View Preparing for Change: Migrations and Versioning Custom Managed Objects Relationships, Fetched Properties, and Expressions Peer-to-Peer Over Bluetooth Using GameKit Online Play: Bonjour and Network Streams Working with Data from the Web MapKit Sending Mail iPod Library Access Keeping Your Interface Responsive Debugging The Road Goes Ever On...

✦ Table of Contents


Cover......Page 1
Contents at a Glance......Page 6
Contents......Page 7
About the Authors......Page 14
About the Technical Reviewer......Page 15
Acknowledgements......Page 16
Preface......Page 17
What You Need to Know......Page 19
What You Need Before You Can Begin......Page 20
What’s In this Book......Page 22
Are You Ready?......Page 24
Part 1: Core Data......Page 25
The Anatomy of Core Data......Page 27
Creating a Core Data Template Application......Page 28
Core Data Concepts and Terminology......Page 30
The Data Model and Persistent Store......Page 31
Entities and the Data Model Editor......Page 36
Attributes......Page 37
Relationships......Page 38
Managed Objects......Page 39
Loading Data from the Persistent Store......Page 42
The Fetched Results Controller......Page 44
Will Change Content Delegate Method......Page 47
Did Change Object Delegate Method......Page 48
Did Change Section Delegate Method......Page 53
Putting Everything in Context......Page 57
A Super Start: Adding, Displaying, and Deleting Data......Page 59
Setting up the Xcode Project......Page 60
Creating the Table View Controller......Page 64
Setting up MainWindow.xib......Page 65
Designing the Data Model......Page 68
The Integer Datatypes......Page 74
Setting the Name Attributes’s Type......Page 76
Adding the Rest of the Attributes......Page 77
Creating HeroListViewController......Page 78
Let ‘Er Rip......Page 97
Done, but Not Done......Page 99
The Devil in the Detail View......Page 101
Table-Based vs. Nib-Based Detail Views......Page 102
Detail Editing View Challenges......Page 103
Paired Arrays......Page 105
Representing......Page 107
Formatting of Attributes......Page 110
Creating the Detail View Controller......Page 112
Declaring the Outlet......Page 121
Adding the Instance to MainWindow.xib......Page 122
Pushing the New Instance onto the Stack......Page 123
Adding Editing Subcontrollers......Page 125
Implementing a Selection List......Page 138
Devil’s End......Page 143
Preparing for Change: Migrations and Versioning......Page 145
About Data Models......Page 146
Creating a New Data Model Version......Page 148
The Current Data Model Version......Page 149
Migrations......Page 151
Time to Migrate On......Page 154
Custom Managed Objects......Page 155
Updating the Data Model......Page 158
Creating the Hero Class......Page 161
Tweaking the Hero Header......Page 163
Defaulting......Page 164
Validation......Page 165
Virtual Accessors......Page 169
Adding Validation Feedback......Page 170
Updating ManagedObjectStringEditor......Page 172
Creating the Value Transformer......Page 173
Creating the Color Attribute Editor......Page 176
Displaying the New Attributes in Hero Edit Controller......Page 179
The Display Problem......Page 181
Adding View-Only Support to Hero Edit Controller......Page 183
Color Us Gone......Page 185
Relationships, Fetched Properties, and Expressions......Page 187
Expanding Our Application: Superpowers and Reports......Page 188
Relationships......Page 190
Fetched Properties......Page 196
Creating Relationships and Fetched Properties in the Data Model Editor......Page 197
Adding Relationships and Fetched Properties to the Hero Class......Page 207
The Big Refactor......Page 208
Adding the isNew Method to NSManagedObject......Page 213
Adding the Save and Cancel Buttons......Page 214
Setting Row Indentation......Page 215
The Set Problem......Page 217
Displaying To-Many Sections......Page 219
Updating Row Selection for To-Many Relationships......Page 223
Handling To-Many Inserts and Deletes......Page 227
Using the New Generic Controller......Page 229
Creating the Fetched Property Attribute Controller......Page 234
Cleaning Up Deleted Objects......Page 236
Wonderful to the Core......Page 239
Part 2: Further Explorations......Page 241
Peer-to-Peer Over Bluetooth Using GameKit......Page 243
This Chapter’s Application......Page 244
Network Communication Models......Page 247
The GameKit Session......Page 250
The Peer Picker......Page 255
Creating the Project......Page 257
Setting Up the View Controller Header......Page 260
Designing the Game Board......Page 264
Creating the TicTacToePacket Object......Page 266
Implementing the Tic-Tac-Toe View Controller......Page 270
Trying It Out......Page 286
Game On!......Page 287
This Chapter’s Application......Page 289
Setting Up a Listener......Page 291
Declaring a Socket Context......Page 293
Creating a Socket......Page 294
Bonjour......Page 299
Publishing a Bonjour Service......Page 301
Delegate Methods for Publication......Page 302
Streams......Page 306
Updating Tic-Tac-Toe for Online Play......Page 310
Creating the Peer Browser Files......Page 329
Building the Peer Browser Interface......Page 330
Implementing the Peer Browser View Controller......Page 331
Time to Play......Page 346
Working with Data from the Web......Page 347
Setting Up the Application Skeleton......Page 349
Retrieving Data Using Foundation Objects......Page 354
Retrieving Data Synchronously......Page 357
Retrieving Data Asynchronously......Page 362
Request Types and Form Parameters......Page 368
POST Parameters......Page 370
404 Conclusion Not Found......Page 376
MapKit......Page 377
This Chapter’s Application......Page 378
Overview and Terminology......Page 379
The Map View......Page 380
Converting Degrees to Distance......Page 384
Accommodating Aspect Ratio......Page 385
Region Change Delegate Methods......Page 386
Annotations......Page 387
Reverse Geocoding......Page 391
Building the MapMe Application......Page 393
Go East, Young Programmer......Page 408
This Chapter’s Application......Page 409
The MessageUI Framework......Page 412
Building the MailPic Application......Page 414
Mailing It In…......Page 421
This Chapter’s Application......Page 423
Working with the iPod Library......Page 425
Media Type......Page 427
Nonfilterable Numeric Attributes......Page 429
Retrieving Lyrics......Page 430
Retrieving Media Items......Page 431
Creating Derived Collections......Page 432
Handling Media Picker Selections......Page 436
Specifying the Music Player Controller’s Queue......Page 437
Skipping Tracks......Page 438
Repeat and Shuffle Modes......Page 439
Adjusting the Music Player Controller’s Volume......Page 440
Music Player Controller Notifications......Page 441
Building the Simple Player Application......Page 442
Avast! Rough Waters Ahead!......Page 466
Keeping Your Interface Responsive......Page 469
Exploring the Concurrency Problem......Page 471
Creating the Stalled Application......Page 472
Timers......Page 476
Fixing Stalled with a Timer......Page 478
Operation Queues & Concurrency......Page 486
Race Conditions......Page 487
Mutex Locks and @synchronized......Page 489
Atomicity and Thread Safety......Page 490
Sleepy Time......Page 492
Operation Priority......Page 494
Other Operation State......Page 495
Setting the Maximum Concurrent Operation Count......Page 496
Fixing Stalled with an Operation Queue......Page 497
Updating StalledViewController.m......Page 505
Queue ’em Up......Page 511
Debugging......Page 513
The Debugger......Page 514
The Debugger Editing Pane......Page 518
The Stack Trace......Page 519
The Variable List......Page 520
The Debugging Controls......Page 521
Trying Out the Debug Controls......Page 522
The Breakpoint Window and Symbolic Breakpoints......Page 526
Conditional Breakpoints......Page 527
Breakpoint Actions......Page 529
Working with Breakpoints......Page 531
Calling Functions and Methods......Page 533
Static Analysis......Page 534
Specific Bugs......Page 535
NSZombie......Page 539
GDB: Stopped at Concluding Paragraph......Page 543
Getting Unstuck......Page 545
Farewell......Page 548
¦ A......Page 549
¦ B......Page 550
¦ C......Page 551
¦ D......Page 554
¦ E......Page 556
¦ F......Page 557
¦ H......Page 558
¦ I......Page 559
¦......Page 560
¦ M......Page 561
¦N......Page 565
¦ O......Page 567
¦ P......Page 569
¦ R......Page 570
¦ S......Page 571
¦......Page 574
¦ U......Page 575
¦ V......Page 576
¦ Z......Page 577


📜 SIMILAR VOLUMES


More iPhone 3 Development: Tackling iPho
✍ David Mark, Jeff LaMarche 📂 Library 📅 2009 🏛 Apress 🌐 English

I have been searching for a quality iPhone Development book for beginners. There are lots of books on iPhone development available, but it is VERY difficult to find something for real beginners. Obective-C is not HTML and it takes real effort to understand iPhone development. To that end, this book

More iPhone 3 Development: Tackling iPho
✍ David Mark, Jeff LaMarche 📂 Library 📅 2009 🏛 Apress 🌐 English

I have been searching for a quality iPhone Development book for beginners. There are lots of books on iPhone development available, but it is VERY difficult to find something for real beginners. Obective-C is not HTML and it takes real effort to understand iPhone development. To that end, this book

More iPhone 3 Development: Tackling iPho
✍ David Mark, Jeff LaMarche 📂 Library 📅 2009 🏛 Apress 🌐 English

If you want to do core data on the iPhone or iPad, this is the book to have. This book devotes a number of chapters on core data and how to create an actual application. It's treatment of core data alone, makes it worth the price.

More iPhone 3 Development: Tackling iPho
✍ Dave Mark, Jeff LaMarche (auth.) 📂 Library 📅 2009 🏛 Apress 🌐 English

<p><p>Interested in iPhone development? Want to learn more? Whether you're a self-taught iPhone development genius or have just made your way through the pages of <em>Beginning iPhone 3 Development</em>, we have the perfect book for you.</p><em>More iPhone 3 Development: Tackling iPhone SDK 3</em> d

More iPhone 3 Development: Tackling iPho
✍ Dave Mark, Jeff LaMarche (auth.) 📂 Library 📅 2009 🏛 Apress 🌐 English

<p><p>Interested in iPhone development? Want to learn more? Whether you're a self-taught iPhone development genius or have just made your way through the pages of <em>Beginning iPhone 3 Development</em>, we have the perfect book for you.</p><em>More iPhone 3 Development: Tackling iPhone SDK 3</em> d

Beginning iPhone 3 Development: Explorin
✍ David Mark, Jeff LaMarche 📂 Library 📅 2009 🏛 Apress 🌐 English

Although I have prior Cocoa/MacOS programming experience, Cocoa Touch on the iPhone was enough different that I needed some help to come up to speed quickly. This book was just the ticket. I found it well written and the level of detail was good.