Before anyone suggests, we are using one managedObjectContext for [context save:&error];
We are saving a new object in Core Data with iOS5.
The issue is, the first time we save a new object, NSManagingContextDidSaveChangesNotification
fires and the [[notification userInfo] objectForKey:NSUpdatedObjectsKey]
gives back an unpopulated object. In iOS6, objectForKey:NSUpdatedObjectsKey
is populated.
Afterwards when we save objectForKey:NSUpdatedObjectsKey
is populated.
The context we are always using is [[UIApplication sharedApplication] delegate].mainDocument.managedObjectContext
.
So the issue is, the first time [context save:&error]
is called, nothing is saved to the db. But it has been saved to the object, so the next time [context save:&error]
is called it gets put in the db.
Does anyone have any info on this. I've heard tell of bugs in CoreData in iOS5 , so if anyone has any advice we would appreciate it.