Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CoreData

 CoreData

Avatar for Emil Marashliev

Emil Marashliev

February 27, 2013
Tweet

Other Decks in Programming

Transcript

  1. Persistent Store ✤NSPersistentSore ✤Store types: XML (OS X only), SQLite,

    Memory, Binary ✤Custom Stores ✤Incremental Stores and Atomic Store ✤NSIncrementalStore Wednesday, February 27, 13
  2. Persistent Store Coordinator ✤NSPersistentStoreCoordinator ✤Associate persistent stores with a model

    ✤Between the persistent store and MOC ✤Save object graphs to persistent storage ✤Retrieve model information ✤Context can NOT exist without coordinator Wednesday, February 27, 13
  3. Entities ✤NSEntityDescription ✤Represent Objects ✤Have attributes (numbers, strings, binary and

    etc.) ✤Can have relationships (to-one, to-many) Wednesday, February 27, 13
  4. Managed Object Context ✤NSManagedObjectContext ✤Manage a collection of managed objects

    ✤Changes aren’t saved until calling save: ✤Check for errors! ✤A context for each thread Wednesday, February 27, 13
  5. Managed Object ✤NSManagedObject ✤Represent entities ✤Superclass of all managed objects

    ✤It is not possible to use direct instance ✤Properties can be accessed via KVO/KVC ✤Pass object between threads via objectID Wednesday, February 27, 13