Skip to content

Commit

Permalink
versionamiento coredata model
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecarreramo committed Apr 10, 2015
1 parent a955323 commit 423a7b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion TMDB/TMDB/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

NSString *seedPath = [[NSBundle mainBundle] pathForResource:@"RKSeedDatabase" ofType:@"sqlite"];
NSError *error;
NSPersistentStore *persistentStore = [managedObjectStore addSQLitePersistentStoreAtPath:storePath fromSeedDatabaseAtPath:seedPath withConfiguration:nil options:nil error:&error];
NSDictionary *options = @{
NSMigratePersistentStoresAutomaticallyOption : @YES,
NSInferMappingModelAutomaticallyOption : @YES
};
NSPersistentStore *persistentStore = [managedObjectStore addSQLitePersistentStoreAtPath:storePath fromSeedDatabaseAtPath:seedPath withConfiguration:nil options:options error:&error];
NSAssert(persistentStore, @"Failed to add persistent store with error %@", error);


Expand Down

0 comments on commit 423a7b5

Please sign in to comment.