Trouble adding CoreData library to existing iPhone app
I was trying to get core data to work inside an app that I had already started, but I was getting errors like:
/…/Classes/MyAppAppDelegate.h:12: error: expected specifier-qualifier-list before ‘NSManagedObjectModel’
It seemed like it was not including the CoreData library, but I had added the framework—what else did I need to do?
It turns out, that you also have to edit the MyApp_Prefix.pch file to add the line:
#import <CoreData/CoreData.h>
Now it works!