Resolve Conflicts for Concurrent Editing in iOS
Conflict resolution is used when there are concurrent updates to the same data from multiple users — for example, when a user updates an annotation at nearly the same time that another user updates this same annotation. Or, when a device reconnects to a network and transfers edits after being offline for an extended period of time.
Depending on how you implement annotation synchronization, conflict resolution is managed differently.
When using PSPDFKit Instant, conflict resolution is automatically managed for you. No additional work is required.
If your application will support multiple users concurrently working on the same document, you must create conflict resolution logic.
Robust conflict resolution logic ensures consistent and predictable annotation behavior, which increases user trust in your application. Without this logic, your users may experience lost, missing, or duplicated annotations.
You may encounter these types of data conflicts when building your own synchronization solution for a concurrent user environment:
Update conflicts: An update conflict occurs when two modifications originating from different users update the same annotation at nearly the same time.
Delete conflicts: A delete conflict occurs when one user deletes an annotation, while another user modifies that same annotation at nearly the same time.
The risk of data conflict is amplified when users are located in multiple timezones or are working offline.
Conflict resolution, version tracking, diffing, and merging can be challenging to build, which is why we recommend using Instant synchronization when possible.
ℹ Info: When building your own solution, our technical support team will gladly help with questions specific to using our SDK. However, due to the complexity of building your own synchronization solution, support is limited to PSPDFKit technology.