The NSManagedObjectContext saves changes asynchronously or synchronously?
If asynchronously, then how can I wait for saving changes?
The NSManagedObjectContext saves changes asynchronously or synchronously?
If asynchronously, then how can I wait for saving changes?
Synchronously.
You can put any code you want to run after saving just after the save
call.
The methods -(void)willSave
and -(void)didSave
on NSManagedObject
allow you to perform behaviour on your model class after/before save.
If you're on the Mac you can also watch for a notification called NSManagedObjectDidSaveNotification