Skip to main content

Installation

Requirements

Our SDKs

Flutter SDK

Typescript SDK (planned)

Add dependency

Basic setup

  1. Create a project in the PocketSync console
  2. Initialize PocketSync in your app:

Configuration

PocketSync can be configured with various options to customize its behavior. The PocketSyncOptions class accepts the following parameters: Example configuration with custom options:

Sync management

  • Call PocketSync.instance.start() to start the sync process.
  • Call PocketSync.instance.stop() to stop the sync process.
  • Make sure to call PocketSync.instance.setUserId(userId: 'user-123') before starting the sync process. This is required to identify the user and track their changes.

Device id generation

PocketSync will automatically generate a unique device identifier for your app. This identifier is used to track changes made by the user on this device. There are some known limitations with device id generation on iOS:
  • If the app is uninstalled and reinstalled, the device id will change.
  • If the app is deleted and reinstalled, the device id will change.
  • If the app is deleted and reinstalled, the device id will change.

Next Steps