views:

1112

answers:

4

I want to implement Core Data into my iPhone app. So what is the best way to learn Core Data specifically for the iPhone? I have 4ish hours that i can devote to this today, so ideally I would be competent enough to add this (however slightly) into my app.

The only way i retain data now is through NSUserDefaults, just so that when the app is closed and reopened, their data is still there. I want to give the user the ability to save sets of data, read them, edit them, delete them, etc.

+3  A: 

If you don't already know about this, this is very useful:

Core Data Tutorial for iPhone OS

mahboudz
+1: This is a really good introduction to Core Data.
Steve Harrison
+5  A: 

Getting Started with Core Data in the iPhone Dev Center did the trick for me. :-)

No, seriously, it might seem like obvious advice, but that one-page document lays out a nice strategy for which documents and tutorials to read and in which order. Once you work through the first tutorial it recommends, the weird terminology will feel a lot less weird.

No Surprises
+1  A: 

Two books that are great references for Core Data are "Core Data: Apple's API for Persisting Data on Mac OS X" by Marcus Zarra and "iPhone SDK Development" by Bill Dudney and Chris Adamson. Both walk you through sample code for handling Core Data on the iPhone, with slightly different perspectives on the framework. The Core Data book provides the best overall reference on the subject that you'll find, outside of Apple's own documentation.

Additionally, if you purchase the iPhone video track from this year's WWDC, the presentations "Introduction to Core Data on iPhone" and "What's New in Core Data" are great resources. ADC Select members also have access to Core Data presentations from older WWDCs, including ones that explain the fundamental concepts of the framework and how to tune the performance of your Core Data application.

Brad Larson
+1  A: 

Make sure you don't stop after the first document - Core Data Turorial for iPhone OS is excellent but then I tried to change the model and everything crashed with fairly cryptic error messages. Getting Started with Core Data is the next place to go. Unless you read the sections on versioning the data model you will probably run into big problems as soon as you start to adapt the example code for your own use.

Adam Eberbach