I suspect the confusion stems from what a NSManagedObjectContext actually is. A context is a scratchpad that allows you to store edits to objects that you may want to save in the future. If you were to dealloc a NSManagedObjectContext before saving it, all changes go away like they never happened, including any updates to the metadata for the store.
By seeing the context as a scratchpad, the metadata API documentation starts to make sense. When you update the metadata at the context level, that is a temporary change. When you save that context, you are telling the store to update its state based on what is in the context.
Committing the scratchpad to permanence.
Now, conflicts. If you were to change the same metadata key in two different contexts; you produced a race condition.
First save wins.
Second save fails with, I suspect, an interesting error.
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: