Steps to migrate

The beta version of this SDK introduces a Swift-native wrapper around the package generated from the Kotlin Multiplatform SDK, bringing a more Swift-native interface for developers. This results in several API updates from the more Kotlin-based alpha version. The main changes are:

  • The PowerSyncDatabase no longer needs a driver argument and it must be removed.
  • The interface for PowerSyncDatabase now uses PowerSyncDatabaseProtocol which may require some changes to databases uses.
  • If you were using __uploadData and __fetchCredentials in your PowerSyncBackendConnector you must remove the __ and update the methods to uploadData and fetchCredentials.
  • @MainThread usage is no longer required and should be removed.
  • Implementing SuspendTaskWrapper for database transactions is no longer required and should be removed.

See the To-Do List Demo app as a reference.