Keep local data first and treat Persistly as the canonical sync target, not the only source of truth while offline.
Offline Sync Flow
Persistly works best when the game is local-first and sync-aware.
The right mental model is local gameplay data first, Persistly as canonical sync target second. That keeps offline play possible and makes sync pressure predictable.
Rules
Use these constraints as your baseline integration pattern.
Use SDK save helpers to write local drafts immediately, then call due-sync or force-sync from safe gameplay and lifecycle moments.
Use forceSync for meaningful lifecycle events such as foreground, background, checkpoint, prestige, or manual save moments.
Respect 429 responses and let SDK retry/backoff behavior recover instead of retrying in a tight loop.
Do not call the runtime every frame or every tiny data mutation.
Lifecycle
Recommended sync cadence for idle and progression-heavy games.
Keep gameplay data locally while the game is running, even if the device is offline.
Persist accountId, accountSessionToken, slotId, and the last canonical save snapshot after account creation.
Write local drafts immediately, then call SDK sync methods from safe moments; runtime policy controls due-sync cadence.
Force sync on important moments such as manual save, foreground/background, checkpoint, prestige, or before account-sensitive actions.
If a conflict occurs, replace the canonical local snapshot with the server payload first, then decide whether to reapply local edits.