use of undeclared identifier 'NSEntityDescription'

Viewed 7597

I've been banging my head against this for too long. I have two ViewControllers trying to use NSEntityDescription, one can and one can't (giving me the above error).

Both ViewControllers import AppDelegate.h

I figure that it has to be a problem with the ManagedObjectContext but both ViewControllers set the ManagedObjectContext in ViewDidLoad the same way:

if (!self.managedObjectContext) {
        self.managedObjectContext =  [(AppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext];
    }

Maybe it has to do with the view controller hierarchy? Tho, I'm under the assumption that the use of NSEntityDescription is based upon the managedObjectContext.

Thanks!

1 Answers
Related