Home > DeveloperSection > Interviews > What is the use of ‘Managed Object Context’ in Core Data

Posted on    September-22-2015 11:17 PM

 iPhone iPhone  Ios  Objective C 
 1 Answer(s)
  310  View(s)
Rate this:

Tarun Kumar

Total Post:107

Posted on    September-22-2015 11:17 PM

In Core Data ‘Managed Object Context’ are actually instances of NSManagedObjectContext class. Applications that uses Core Data never interact directly with the persistent store, it interacts with the managed object context layer of the Core Data stack. The context maintains the status of the objects in relation to the underlying data store and manages the relationships between managed objects defined by the managed object model. All interactions with the underlying database are held temporarily within the context until the context is instructed to save the changes, at which point the changes are passed down through the Core Data stack and written to the persistent store.

Don't want to miss updates? Please click the below button!

Follow MindStick