Design offline-first sync and conflict resolution
WHAT IT TESTS: offline-first sync design. OUTLINE: queue local mutations with timestamps and sync state, push and pull deltas using a change token or updatedAt cursor, and resolve conflicts with a chosen policy like last-write-wins or field-level merge.
WHAT IT TESTS: whether you can design a robust two-way sync rather than naive push or pull. ANSWER OUTLINE: treat the local store as source of truth for the UI, record each local change in an outbox with a dirty flag and timestamp, and sync deltas using a server change token or updatedAt cursor with stable server identifiers; on reconnect, push pending mutations and pull remote changes, then resolve conflicts via a deliberate policy such as last-write-wins, server-wins, or field-level merge, ideally backed by version numbers.
Read the original → interview
- #ios
- #offline-first
- #sync
- #core-data
- #conflict-resolution
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.