github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

erica / iphone-3.0-cookbook-

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 278
    • 28
  • Source
  • Commits
  • Network (28)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Sample Code — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Added infinite scroller to C09 (11X) but I'm really not happy with the 
results. Feel free to debug, enhance. 
Erica Sadun (author)
Tue Dec 08 09:00:07 -0800 2009
commit  0eef8088d7db75a146471d04b177b89b7b8a5ffb
tree    17bc0be2931ed5643716bc6685b52bb3a4930b94
parent  458225d8457a0bd6a1ce222af947723cfecc5c94
iphone-3.0-cookbook- /
name age
history
message
file .gitignore Tue Apr 14 11:43:04 -0700 2009 First Commit [erica]
directory C02-Xcode/ Tue Sep 15 10:04:37 -0700 2009 Core Location [Erica Sadun]
directory C03-Objective-C/ Tue Sep 15 10:04:37 -0700 2009 Core Location [Erica Sadun]
directory C04-Building Interfaces/ Sun Aug 02 13:40:22 -0700 2009 Moving videos back to ericasadun.com [Erica Sadun]
directory C05-ViewControllers/ Thu Dec 03 07:45:47 -0800 2009 Updated all stringWithCString: to non-deprecate... [Erica Sadun]
directory C06-Views/ Wed Aug 05 16:46:42 -0700 2009 C13 and C14 [Erica Sadun]
directory C07-Images/ Thu Dec 03 07:45:47 -0800 2009 Updated all stringWithCString: to non-deprecate... [Erica Sadun]
directory C08-Gestures/ Mon Aug 17 15:40:40 -0700 2009 First draft C15 [Erica Sadun]
directory C09-Controls/ Tue Dec 08 09:00:07 -0800 2009 Added infinite scroller to C09 (11X) but I'm re... [Erica Sadun]
directory C10-Alerts/ Mon Nov 30 14:02:22 -0800 2009 Fixed small bug in 3.1.2 SDK, namely that norma... [Erica Sadun]
directory C11-Tables/ Thu Dec 03 08:16:05 -0800 2009 Fixed error with CFAutorelease in ABContact [Erica Sadun]
directory C12-GameKit/ Thu Dec 03 07:45:47 -0800 2009 Updated all stringWithCString: to non-deprecate... [Erica Sadun]
directory C13-Networking/ Thu Dec 03 07:45:47 -0800 2009 Updated all stringWithCString: to non-deprecate... [Erica Sadun]
directory C14-Device/ Mon Nov 30 14:02:22 -0800 2009 Fixed small bug in 3.1.2 SDK, namely that norma... [Erica Sadun]
directory C15-Media/ Mon Oct 05 09:49:36 -0700 2009 Adding readme for URL schemes [Erica Sadun]
directory C16-Push/ Thu Dec 03 07:45:47 -0800 2009 Updated all stringWithCString: to non-deprecate... [Erica Sadun]
directory C17-CoreLocation/ Mon Oct 05 09:49:36 -0700 2009 Adding readme for URL schemes [Erica Sadun]
directory C18-Address Book/ Thu Dec 03 08:17:49 -0800 2009 Pushing search bar fixes via Jack Lucky [Erica Sadun]
directory C19-CoreData/ Thu Dec 03 08:16:05 -0800 2009 Fixed error with CFAutorelease in ABContact [Erica Sadun]
directory C20-StoreKit/ Thu Dec 03 07:27:04 -0800 2009 Updated hostname. Thanks, Gunnary Larisch [Erica Sadun]
directory C21-Grab Bag/ Mon Oct 05 09:49:36 -0700 2009 Adding readme for URL schemes [Erica Sadun]
file README.markdown Thu Sep 24 09:12:42 -0700 2009 Added README to repository [Erica Sadun]
file cleanup Tue Jul 07 08:39:14 -0700 2009 Rough Cuts Initialization [Erica Sadun]
file do-git Tue Apr 14 11:43:04 -0700 2009 First Commit [erica]
README.markdown

iPhone Developer's Cookbook

Welcome to the source code repository for the 3.0 edition of the iPhone Developer's Cookbook. Sample code is never a fixed target. It continues to evolve as Apple updates its SDK and the CocoaTouch libraries. Get involved. You can pitch in by suggesting bug fixes and corrections as well as by expanding the code that's on offer. Github allows you to fork repositories and grow them with your own tweaks and features, and share those back to the main repository. If you come up with a new idea or approach, let us know. We'd be happy to include great suggestions both at the repository and in the next edition of this cookbook.

About the Cookbook

The iPhone Developer's Cookbook is written for experienced developers who want to build apps for the iPhone and iPod touch. It helps to be already be familiar with Objective-C, the Cocoa frameworks, and the Xcode Tools. That said, if you're new to the platform, this new edition of The iPhone Developer's Cookbook includes a quick-and-dirty introduction to Objective-C along with an intro to the Xcode Tools to help you quickly get up to speed.

Although each programmer brings different goals and experiences to the table, most iPhone developers end up solving similar tasks in their development work:

  • "How do I build a table?"
  • "How do I create a secure Keychain entry?"
  • "How do I search the Address Book?"
  • "How do I move between views?"
  • "How do I use Core Location and the iPhone 3GS's magnetometer?"

And so on. If you've asked yourself these questions, then this book is for you. The iPhone Developer's Cookbook will get you up to speed and working with the iPhone SDK, offering you ready-to-use solutions for the apps you're building today.

What's the deal with main.m?

For the sake of pedagogy, this book's sample code usually presents itself in a single main.m file. This is not how people normally develop iPhone or Cocoa applications, or should be developing them, but it provides a great way of presenting a single big idea. It's hard to tell a story when readers must look through 5 or 7 or 9 individual files at once. Offering a single file concentrates that story, allowing access to that idea in a single chunk. These samples are not intended as stand-alone applications. They are there to demonstrate a single recipe and a single idea. One main.m file with a central presentation reveals the implementation story in one place. Readers can study these concentrated ideas and transfer them into normal application structures, using the standard file structure and layout. The presentation in this book does not produce code in a standard day-to-day best practices approach. Instead, it offers concise solutions that you can incorporate back into your work as needed.

Contrast that to Apple's standard sample code, where you must comb through many files in order to build up a mental model of the concepts that are on-offer. Those samples are built as full applications, often doing tasks that are related to but not essential to what you need to solve. Finding just those relevant portions is a lot of work. The effort may outweigh any gains.

There are two exceptions to this one-file rule. First, application-creation walkthroughs use the full file structure created by Xcode to mirror the reality of what you'd expect to build on your own. The walk through folders may therefore contain a dozen or more files at once.

Second, standard class and header files are provided when the class itself is the recipe or provides a pre-cooked utility class. Instead of highlighting a technique, some recipes offer these pre-cooked class implementations and categories (that is, extensions to a pre-existing class rather than a new class). For those recipes, look for separate .m and .h files in addition to the skeletal main.m that encapsulates the rest of the story.

How to build these projects

Before compiling, make sure you select a deployment target (such as Simulator 3.0 or Device 3.1) from the Project > Set Active SDK menu. All projects in this cookbook have been automatically stripped of specdific target details.

For the most part, the samples for this book use a single application identifier, com.sadun.helloworld. You will need to replace this identifier with one that matches your provision profile. This book uses one identifier to avoid clogging up your iPhone with dozens of samples at once. Each sample replaces the previous one, ensuring that SpringBoard remains relatively uncluttered. If you want to install several samples at once, simply edit the identifier, adding a unique suffix, such as com.sadun.helloworld.table-edits.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server