Instant Sync and Document State in React Native

Every Instant document goes through several states. PSPDFKit Instant provides a number of callbacks from the Instant document state, which are outlined below:

  • onSyncStarted — Triggered when a sync operation starts. This can be a sync initiated by the user or triggered automatically by the Instant document.

  • onSyncFinished — Triggered when a sync operation completes successfully.

  • instantSyncFailed — Triggered when a sync operation fails. It includes an error message explaining the cause of the failure.

  • instantAuthenticationFinished — Triggered when the user successfully completes the authentication process for the Instant document.

  • instantAuthenticationFailed — Triggered when the user fails to authenticate for the Instant document. It includes an error message explaining the cause of the failure.

  • instantDownloadFinished (iOS only) — Triggered when a download operation for the Instant document completes successfully.

  • instantDownloadFailed (iOS only) — Triggered when a download operation for the Instant document fails. It includes an error message explaining the cause of the failure.

For detailed information about the Instant document state, refer to the Android and iOS guides.