I am using MagicalRecord,
The way I install the coreData stack p>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[MagicalRecord setupCoreDataStackWithStoreNamed:@"HITO.sqlite"];
The way I use it
- (void)getQuizzessWithCompletion:(void(^)(NSArray *quizzess, BOOL succes, NSError *error))completion {
NSManagedObjectContext *backGroundContext = [NSManagedObjectContext MR_newPrivateQueueContext] ;
NSArray *quizzess = [Quiz MR_findAllInContext:backGroundContext];
BlockSafeRun(completion, quizzess, YES, nil);
}
What i get
2015-06-17 19:50:53.358 HITO[6677:611576] Created new private queue context: <NSManagedObjectContext: 0x61f990>
2015-06-17 19:50:57.230 HITO[6677:611576] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+entityForName: nil is not a legal NSPersistentStoreCoordinator for searching for entity name 'Quiz''

It seems that the main data stack is not configured properly. I tried to change the methods for setting up the main data stack, but did not succeed.
Bergp source
share