There is no managedObjectContext property in AppDelegate

I have the error in “UITableView with CoreData: Part2” (week 4, module 7). It says that managedObjectContext property is not found in AppDelegate object. How can I fix it? Thanks.


If your are using Xcode 8, you shoud write self.persistentContainer.viewContext instead of self.managedObjectContext. So the full line is like this:

rootVC.myContext = self.persistentContainer.viewContext

1 Like

Thank you so much!

It drove me nuts for a few hours!!! :slight_smile:


Took me a week and 5 attempts! Thank you so much, mate! :slight_smile:

I wish Don left a note somewhere about this change.

Mircea, do you know how to solve this issue?

I get signal SIGABRT in the AppDelegate referencing this line

id child = ( id ) self .window.rootViewController;