Could not locate an NSManagedObjectModel for entity name
Hi there,
I am trying a simple storage of data for an iphone app and using core data but get the following error:
"+entityForName: could not locate an NSManagedObjectModel for entity name 'TimeDate'"
I have created the xcdatamodel under resources and in the header file of the viewcontroller I have
NSManagedObjectContext *managedObjectContext;
and
@property (nonatomic, retain)NSManagedObjectContext *managedObjectContext;
then in the code I have
NSManagedObject *newEntry = [NSEntityDescription insertNewObjectForEntityForName:@"TimeDate" inManagedObjectContext:self.managedObjectContext];
which it fails with an error above.
Can anyone point me in the right direction to as to where I should include NSManagedObjectModel for entity name 'TimeDate'
Thanks in advance.
|