You use a merge policy object to resolve conflicts between the persistent store and in-memory versions of managed objects.
- iOS 5.0+
- macOS 10.7+
- tvOS 5.0+
- watchOS 2.0+
A conflict is a mismatch between state held at two different layers in the Core Data stack. A conflict can arise when you save a managed object context when you have stale data at some layer. There are two places in which a conflict may occur:
Between the managed object context and its in-memory cached state at the persistent store coordinator layer.
Between the cached state at the persistent store coordinator and the external store (file, database, etc.).
Conflicts are represented by instances of