Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

Multiple Managed Object Contexts with Core Data Tutorial

Learn how to use multiple managed object contexts to improve the performance of your apps in this Core Data Tutorial in Swift!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/349-multiple-managed-object-contexts-with-core-data-tutorial

Hi Matthew,
Great tutorial, thanks!
But I think that the finished project is incorrect. In JournalListViewController's method prepare, the temporary context has to be created in "SegueListToDetailAdd" segue, not in "SegueListToDetail". Am I right?

No, the final project for this tutorial is right. The tutorial just talks about editing not adding new entries. In the book the chapter goes further and does update the "SegueListToDetailAdd".

Ok,
I had missed that detail, thank you for your response!

However, in "SegueListToDetail" I don’t think create a new NSManagedObjectContext will be necessary. We can do detailViewController.journalEntry = surfJournalEntry directly, because surfJournalEntry object will be modified only in JournalEntryViewController's updateJournalEntry function, when save button was tapped.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!