<!--
{
  "documentType" : "article",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/conflict-resolution",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Conflict resolution"
}
-->

# Conflict resolution

Detect and resolve conflicts that occur when data is changed on multiple threads.

## Topics

### Conflict Management

[`NSConstraintConflict`](/documentation/CoreData/NSConstraintConflict)

An encapsulation of conflicts that occur during an attempt to save a managed object.

[`NSMergeConflict`](/documentation/CoreData/NSMergeConflict)

An encapsulation of conflicts that occur during an attempt to save changes in a managed object context.

[`NSMergePolicy`](/documentation/CoreData/NSMergePolicy)

A policy object that you use to resolve conflicts between the persistent store and in-memory versions of managed objects.

[`NSQueryGenerationToken`](/documentation/CoreData/NSQueryGenerationToken)

A token that indicates which generation of the persistent store is being accessed.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)