I'm new to "Magical Record" and pretty new to iOS programming in general. I'm just trying to get things set up. I've followed the instructions in http://yannickloriot.com/2012/03/magicalrecord-how-to-make-programming-with-core-data-pleasant/, but instead of:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[MagicalRecordHelpers setupCoreDataStackWithStoreNamed:@"MyDatabase.sqlite"];
// ...
return YES;
}
I think I'm using a newer version which changes the AppDelegate to:
@implementation LSAppDelegate
@synthesize window = _window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
[MagicalRecord setupCoreDataStackWithStoreNamed:@"MyDatabase.sqlite"];
return YES;
}
- (void)applicationWillTerminate:(UIApplication *)application{
[MagicalRecord cleanUp];
}
@end
When running, I get a SIGABRT at:
+ (NSManagedObjectModel *) MR_mergedObjectModelFromMainBundle;
{
return [self mergedModelFromBundles:nil];
}
The stack trace looks like:
#0 0x00011f7e in +[NSManagedObjectModel(MagicalRecord) MR_mergedObjectModelFromMainBundle] at /Developer/projects/demo/MagicalRecord/Categories/NSManagedObjectModel+MagicalRecord.m:33
#1 0x00011eb4 in +[NSManagedObjectModel(MagicalRecord) MR_defaultManagedObjectModel] ()
#2 0x000147ca in +[NSPersistentStoreCoordinator(MagicalRecord) MR_coordinatorWithSqliteStoreNamed:withOptions:] ()
#3 0x000148fa in +[NSPersistentStoreCoordinator(MagicalRecord) MR_coordinatorWithSqliteStoreNamed:] ()
#4 0x00016546 in +[MagicalRecord(Setup) setupCoreDataStackWithStoreNamed:] ()
#5 0x000026eb in -[LSAppDelegate application:didFinishLaunchingWithOptions:] ()
I have no idea what I did wrong or what I can do to fix it. Any ideas?