I have an application that will use Core Data.
I've added the Core Data framework to the linked library list in XCode.
In one of my classes, I try to set up the NSManagedObjectContext along with the other required classes as folows:
@interface MyClass : NSObject {
NSManagedObjectModel *managedObjectModel;
NSManagedObjectContext *managedObjectContext;
NSPersistentStoreCoordinator *persistentStoreCoordinator;
}
@property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;
I'm using the Locations sample app as a reference, it also uses Core Data, it also has it linked the same way I have.
What am I doing wrong?