Core Data Tutorial for iPhone OS

Understanding a Core Data-Based Project
Together with various other supporting files, the template provides you with:

An application delegate class

A MainWindow interface (.xib) file

A Core Data model (.xcdatamodel) file.typically referred to as the managed object model

The application also links against the Core Data framework.

Of the resources, the first two should be familiar, although the details of the delegate class will be new. The model file is described later in “Managed Object and Model” (page 21). For now, examine the header file of the application delegate class. In addition to the standard window and view controller, it provides four other properties and a new method:

- (IBAction)saveAction:sender;

@property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, retain, readonly) NSManagedObjectContext
*managedObjectContext;
@property (nonatomic, retain, readonly) NSPersistentStoreCoordinator
*persistentStoreCoordinator;

@property (nonatomic, readonly) NSString *applicationDocumentsDirectory;

As its name implies, the applicationDocumentsDirectory property simply returns the path to the application’s documents directory, which is where the file containing the application’s data will be located. Similarly, the save action method saves the application’s data to disk. Saving is discussed in greater detail throughout this document. The remaining properties provide access to what’s called the Core Data stack.

The Core Data Stack
Stack is the term used to describe a collection of Core Data framework objects that work together to get modeled objects from and save data to a persistent store—the file where your data is stored. Conceptually, a persistent store is like a database, with tables and records. (One of the store types you can use with Core Data is SQLite, but the store doesn’t have to be an actual database.)

Download file here

Incoming Search Terms : Core data lookup table model, Core Data Tutorial for iPhone OS, iphone core data, NSManagedObjectContext save date secure

Share or Bookmark this post:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz

Leave a Reply

Incoming Search Terms : Core data lookup table model, Core Data Tutorial for iPhone OS, iphone core data, NSManagedObjectContext save date secure