Skip to Content
Client SDKSync Status Reference

Sync Status Reference

The SDK reports detailed status updates via the statusCallback. This page documents all status values and their meanings.

Status Values

UP_TO_DATE

The application is running the latest version.

case SyncStatus.UP_TO_DATE: console.log('App is up to date'); break;

When triggered:

  • After checking for updates when no update is available
  • When current version matches or exceeds server version

UPDATE_INSTALLED

An update has been downloaded, unzipped, and installed. The update will activate on next app restart.

case SyncStatus.UPDATE_INSTALLED: console.log(`Update ${data?.version} installed!`); console.log('Restart to apply'); break;

Data properties:

  • version: Update version number
  • buildNumber: Update build number

UPDATE_IGNORED

An available update was skipped.

case SyncStatus.UPDATE_IGNORED: console.log('Update skipped:', data?.compatibilityReason); break;

When triggered:

  • Update requires store update and allowStoreUpdateOverride is false
  • User declined update in manual flow

Data properties:

  • message: Reason for skipping
  • compatibilityReason: Detailed incompatibility reason

ERROR

An error occurred during the sync operation.

case SyncStatus.ERROR: console.error('Sync error:', data?.message); break;

When triggered:

  • Network request failed
  • Download failed
  • Unzip failed
  • Install failed

Data properties:

  • message: Error message or description
  • updateAvailable: Always false on error

SKIPPING_BECAUSE_HMR_ENABLED

Hot Module Replacement is active, so OTA sync is skipped.

case SyncStatus.SKIPPING_BECAUSE_HMR_ENABLED: console.log('OTA skipped - development mode'); break;

When triggered:

  • HMR is enabled (typically during development)
  • User didn’t explicitly override this behavior

IN_PROGRESS

A sync operation is already in progress.

case SyncStatus.IN_PROGRESS: console.log('Sync already running'); break;

When triggered:

  • checkForUpdates() called while another check is running
  • Prevents duplicate concurrent syncs

CHECKING_FOR_UPDATE

Intermediate status. The SDK is checking the server for updates.

case SyncStatus.CHECKING_FOR_UPDATE: showSpinner('Checking for updates...'); break;

AWAITING_USER_ACTION

Intermediate status. Waiting for user to respond to update prompt.

case SyncStatus.AWAITING_USER_ACTION: // User dialog is shown break;

When triggered:

  • Manual update flow with user confirmation
  • promptToRestartAfterInstall dialog is shown

DOWNLOADING_PACKAGE

Intermediate status. The update package is being downloaded.

case SyncStatus.DOWNLOADING_PACKAGE: showSpinner('Downloading update...'); break;

Use downloadProgressCallback for progress percentage.


INSTALLING_UPDATE

Intermediate status. The update package is being installed.

case SyncStatus.INSTALLING_UPDATE: showSpinner('Installing update...'); break;

This includes unzipping and copying files.


Complete Example

import { initNorrix, SyncStatus } from '@norrix/client-sdk'; initNorrix({ updateUrl: 'https://norrix.net', checkForUpdatesOnLaunch: true, installUpdatesAutomatically: true, statusCallback: (status, data) => { switch (status) { // Progress states case SyncStatus.CHECKING_FOR_UPDATE: console.log('Checking for updates...'); break; case SyncStatus.DOWNLOADING_PACKAGE: console.log('Downloading update...'); break; case SyncStatus.INSTALLING_UPDATE: console.log('Installing update...'); break; case SyncStatus.AWAITING_USER_ACTION: console.log('Waiting for user...'); break; // Final states case SyncStatus.UP_TO_DATE: console.log('App is up to date'); break; case SyncStatus.UPDATE_INSTALLED: console.log(`Update ${data?.version} installed!`); console.log('Build:', data?.buildNumber); break; case SyncStatus.UPDATE_IGNORED: console.log('Update skipped'); if (data?.compatibilityReason) { console.log('Reason:', data.compatibilityReason); } break; // Error states case SyncStatus.ERROR: console.error('Sync error:', data?.message); break; case SyncStatus.IN_PROGRESS: console.log('Sync already in progress'); break; case SyncStatus.SKIPPING_BECAUSE_HMR_ENABLED: console.log('Skipping - HMR enabled'); break; } }, });

Status Flow Diagram

checkForUpdates() CHECKING_FOR_UPDATE ├─── No update ──────► UP_TO_DATE ├─── Store required ─► UPDATE_IGNORED DOWNLOADING_PACKAGE INSTALLING_UPDATE ├─── Success ────────► UPDATE_INSTALLED └─── Failure ────────► ERROR