Re: could not locate an NSManagedObjectModel
Re: could not locate an NSManagedObjectModel
- Subject: Re: could not locate an NSManagedObjectModel
- From: Darren Wheatley <email@hidden>
- Date: Sun, 20 Feb 2011 22:48:20 +0000
- Thread-topic: could not locate an NSManagedObjectModel
Hi,
Just to ask the obvious question, but you've created the
persistentStoreCoordinator and the managedObjectModel and hooked them all
up right?
I've been having similar problems this weekend, and running Instruments
with Zombies enable has been a great help. It help me pin point the
problem area in my app.
HTH
Darren.
On 20/02/2011 21:23, "Shane" <email@hidden>
wrote:
>Trying to learn core data and I have added it to my application while
>swapping out my old ways. So I have this initially ...
>
>@synthesize managedCoreDataObjectContext;
>
>- (void) awakeFromNib
>{
> ...
> [self setManagedCoreDataObjectContext:[[NSManagedObjectContext alloc]
>init]];
>}
>
>- (void) applicationDidFinishLaunching:(NSNotification *) aNotification
>{
> NSManagedObjectContext *context = [self managedCoreDataObjectContext];
>
> // error is happening on this next line
> network = [NSEntityDescription
> insertNewObjectForEntityForName:@"Network"
> inManagedObjectContext:context];
>}
>
> +entityForName: could not locate an NSManagedObjectModel for entity
>name 'Network'
>
>Network is a class that is subclassed from NSManagedObject, and
>included in my project. My *.xcdatamodel file is also included in this
>project.
>
>Any help much appreciated.
>_______________________________________________
>
>Cocoa-dev mailing list (email@hidden)
>
>Please do not post admin requests or moderator comments to the list.
>Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
>Help/Unsubscribe/Update your Subscription:
>.co.uk
>
>This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden