views:

33

answers:

1

Hello,

I'm having some trouble committing records to the database. When I click a button, I download records from the website, the objects are there in memory and everything works fine but these objects are only committed to core data when I actually close the app. Is there anyway to commit them to core data straight away, without having to close the app.

Regards, Stephen

+2  A: 

Call the following method on your NSManagedObjectContext:

Attempts to commit unsaved changes to registered objects to their persistent store.

- (BOOL)save:(NSError **)error
Martin Brugger