Make sure that you are saving the context after your changes. The template method is:
- (void)saveContext {
NSError *error = nil;
NSManagedObjectContext *managedObjectContext = self.managedObjectContext;
if (managedObjectContext != nil) {
if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) {
// Replace this implementation with code to handle the error appropriately.
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
NKLOG(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
}
}
If you want to open your database, you can try this firefox addon called SQLite Manager
And search for your .sqlite file, the default path for your app would be:
/Users/YOUR_USER/Library/Application Support/iPhone Simulator/IOS_VERSION/Applications/GENERATED_HASH/Documents/YOUR_APP.sqlite