Swift
Migrating from Alpha to Beta
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 usesPowerSyncDatabaseProtocol
which may require some changes to databases uses. - If you were using
__uploadData
and__fetchCredentials
in yourPowerSyncBackendConnector
you must remove the__
and update the methods touploadData
andfetchCredentials
. @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.
Was this page helpful?