iOS App Sharing
Share the programming experience in iOS application development.
Showing posts with label
Core Data
.
Show all posts
Showing posts with label
Core Data
.
Show all posts
Friday, February 17, 2012
Core Data: could not locate an NSManagedObjectModel for entity name 'XXX'
The following code is a simple trick to solve this issue. Add it to viewDidLoad or somewhere the code to access the entity.
if
(
managedObjectContext
==
nil
) {
managedObjectContext = [(YourAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; }
Remember to import "YourAppDelegate.h" !!!
Older Posts
Home
Subscribe to:
Posts (Atom)