+entityForName: nil is not a legal NSManagedObjectContext parameter searching for entity name 'Account''
问题 I have tried a lot of options, but can't find the solution for this problem. I created a Core Data file and named the entity Account, Created an string attribute called username. Then edited the class of the entity to NSManagedObject, not sure if this is right. Now, the following code is in my LoginViewController: - (void)viewDidLoad { [super viewDidLoad]; ITAppDelegate *appDelegate = (ITAppDelegate *)[[UIApplication sharedApplication] delegate]; NSManagedObjectContext *context = appDelegate