Permalink
Browse files

Adjusted seed database code so the seed database is saved with the de…

…fault seed database name.
  • Loading branch information...
1 parent aa6102f commit f1fdbe96ca93dee62f880db059ddcb209df2e738 @bmctigue bmctigue committed Jul 1, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 Examples/RKTwitterCoreData/Classes/RKTwitterAppDelegate.m
@@ -26,11 +26,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
// Initialize object store
#ifdef RESTKIT_GENERATE_SEED_DB
- NSString* seedDatabaseName = nil;
+ NSString *seedDatabaseName = nil;
+ NSString *databaseName = RKDefaultSeedDatabaseFileName;
#else
- NSString* seedDatabaseName = RKDefaultSeedDatabaseFileName;
+ NSString *seedDatabaseName = RKDefaultSeedDatabaseFileName;
+ NSString *databaseName = @"RKTwitterData.sqlite";
#endif
- objectManager.objectStore = [RKManagedObjectStore objectStoreWithStoreFilename:@"RKTwitterData.sqlite" usingSeedDatabaseName:seedDatabaseName managedObjectModel:nil delegate:nil];
+
+ objectManager.objectStore = [RKManagedObjectStore objectStoreWithStoreFilename:databaseName usingSeedDatabaseName:seedDatabaseName managedObjectModel:nil delegate:self];
// Setup our object mappings
/*!

0 comments on commit f1fdbe9

Please sign in to comment.