In order to view this lesson, you must purchase this course.
Core Data can be a strange beast with all of the moving parts involved setting up our objects. One particular class called NSManagedObjectContext is especially difficult to predict if you have multiple instances of it interacting with Core Data. In today's lesson, we look at what happens when we lose reference to our context and attempt to show data inside of our UI.
The solution to maintain our context across our application is to use a <b>Singleton</b> object that lives on forever inside of our application. Inside of this singleton, we keep our <b>NSPersistentContainer</b> property and derive our context using it.