Facing issue \"Value of type \'AppDelegate\' has no member \'managedObjectContext\' In new Xcode 8 (using Swift 3, iOS 10) when trying to create new context in View Controll
NSPersistentContainer
has a viewContext
property that is an NSManagedObjectContext
type.
As a side note, if you create a Master-Detail application in Xcode 8, Apple's sample code puts the managedObjectContext
property in the MasterViewController.swift file and sets it by using said viewContext
property in AppDelegate.