- DATE:
- AUTHOR:
- PowerSync Product Team
PowerSync Swift SDK: v1.6.0
We are excited to announce the Version 1.6.0 release of the PowerSync Swift client SDK 
Visit the full SDK reference to get started, for implementation details, and code snippets.
See the full changelog below.
Have any questions or feedback? Chat with us and the PowerSync community on Discord.
Changelog
1.6.0
[ADDED] The
getCrudTransactions()API to upload multiple transactions in a batch. (PR #245)[IMPROVED] [Attachment Helpers] Makes the attachment system recover from cases where re-installing the app changes absolute paths on iOS simulators. (PR #80)
[IMPROVED] Updated the
powersync-sqlite-coreextension to v0.4.6. (changelog)[IMPROVED] Additional compatibility with new Swift 6.2 / XCode 26 concurrency checks.
[IMPROVED] Updates the Kotlin SDK build to
1.6.0which establishes a foundation on which we can add libraries such as SQLCipher for encryption in the future. (PR #230)
1.5.1
[IMPROVED] Additional Swift 6 Strict Concurrency Checking declarations added for remaining protocols. (PR #71)
[FIXED] An issue in the legacy sync client where local writes made offline could have their upload delayed until a keep-alive event was received. This could also cause downloaded updates to be delayed even further until all uploads were completed. (PR #255)
[IMPROVED] Updated the
powersync-sqlite-coreextension to v0.4.5. (changelog)
1.5.0
[ADDED] Support for strict concurrency checking for Swift 6. (PR #70)
Accepted query parameter types have been updated from
[Any]to[Sendable]. This should cover all supported query parameter types.Query and lock methods' return
Resultgeneric types now should extendSendable.Deprecated default
open class PowerSyncBackendConnector. Developers should preferably implement thePowerSyncBackendConnectorProtocol.[BREAKING CHANGE FOR ATTACHMENTS] Attachment helpers have also been updated to better support strict concurrency checking. If you currently customize or extend
AttachmentQueueyou will need to update your implementation to extendAttachmentQueueProtocolinstead. The default instantiation ofAttachmentQueueremains unchanged. See the README for details.
[IMPROVED] Lock error handling and reporting by adding some additional helpers to the
PowerSyncKotlinmodule. (PR #69)[FIXED]
nullvalues in CRUD entries being reported as"null"strings. (PR #69)[FIXED] XCode preview functionality is now restored. (PR #71)
[INTERNAL] Updated the Kotlin Kermit logger instantiation to be performed directly in the Swift Adapter. (PR #67)
1.4.0
[ADDED] Support for configuring the Ktor networking client. (PR #63)
[IMPROVED] Updated the
powersync-sqlite-coreextension to v0.4.4. This fixes a regression in 0.4.3. (PR #65)
1.3.1
[ADDED] Support receiving binary sync lines over HTTP when the Rust client is enabled. (PR #232)
[IMPROVED] Updated SQLite to 3.50.3.
[IMPROVED] Remove the experimental WebSocket transport mode which proved unstable. (PR #232)
1.3.0
[ADDED] Support for raw tables, which are custom tables managed by the user instead of JSON-based views managed by the SDK.
[IMPROVED]Updated the
powersync-sqlite-coreextension to v0.4.2, which improves the reliability of the new Rust sync client implementation.[FIXED] Attachments never downloading again when the sandbox path of the app (e.g. on the simulator) changes.
1.2.1
[ADDED] Initial watchOS support. Currently this has not been tested on actual devices, we encourage this and feedback from the community!
[IMPROVED] Updated the
powersync-sqlite-coreextension to v0.4.1, which fixes an issue with the new Rust-based sync client implementation.[FIXED] CRUD uploads when WebSockets are used as a connection method.
1.2.0
[ADDED] A new sync client implementation written in Rust instead of Kotlin/Swift. While this client is still
experimental, we intend to make it the default in the future. The main benefit of this client is
faster sync performance, but upcoming features will also require this client. We encourage
interested users to try it out by opting in to experimental APIs and passing options when
connecting:@_spi(PowerSyncExperimental) import PowerSync try await db.connect(connector: connector, options: ConnectOptions( newClientImplementation: true, ))Switching between the clients can be done at any time without compatibility issues. If you run
into issues with the new client, please reach out to us![IMPROVED]
CrudBatchandCrudTransactioncompletefunction extensions. Developers no longer need to specifynilas an argument forwriteCheckpointwhen callingCrudBatch.complete. The basecompletefunctions still accept an optionalwriteCheckpointargument if developers use custom write checkpoints.
guard let finalBatch = try await powersync.getCrudBatch(limit: 100) else {
return nil
}
- try await batch.complete(writeCheckpoint: nil)
+ try await batch.complete()[IMPROVED] Updated the
powersync-sqlite-coreextension to v0.4.0, which improves sync performance.[IMPROVED] In addition to HTTP streams, the Swift SDK also supports fetching sync instructions from the
PowerSync service in a binary format. This requires the new sync client, and can then be enabled
on the sync options:@_spi(PowerSyncExperimental) import PowerSync try await db.connect(connector: connector, options: ConnectOptions( newClientImplementation: true, connectionMethod: .webSocket, ))
[FIXED] Reported progress around compactions / defrags on the sync service.
1.1.0
[ADDED] Report real-time progress information about downloads through
SyncStatus.downloadProgress.[ADDED] Exposed new table options allowing for more granular control over update tracking and metadata.
trackPreviousValues: PopulatesCrudEntry.previousValues, so you can see both the old and new values during an update.trackMetadata: Adds a_metadatacolumn to the table. Use this to store any custom metadata for uploads—accessible viaCrudEntry.metadata.ignoreEmptyUpdates: Skips generating CRUD entries when no data actually changes—reduces noise inuploadData.
1.0.0
This SDK is now in a stable V1 release

[BREAKING CHANGES]
Completing CRUD transactions or CRUD batches, in the
PowerSyncBackendConnectoruploadDatahandler, now has a simpler invocation.indexbasedSqlCursorgetters now throw if the query result column value isnil. This is now consistent with the behaviour of named column getter operations. NewgetXxxxxOptional(index: index)methods are available if the query result value could benil.SqlCursorgetters now directly return Swift types.getLonghas been replaced withgetInt64.Client parameters now need to be specified with strictly typed
JsonValueenums.SyncStatusvalues now use Swift primitives for status attributes.lastSyncedAtnow is ofDatetype.crudThrottleMsandretryDelayMsin theconnectmethod have been updated tocrudThrottleandretryDelaywhich are now of typeTimeInterval. Previously the parameters were specified in milliseconds, theTimeIntervaltyping now requires values to be specified in seconds.throttleMsin the watched queryWatchOptionshas been updated tothrottlewhich is now of typeTimeInterval. Previously the parameters were specified in milliseconds, theTimeIntervaltyping now requires values to be specified in seconds.See code snippets here for all of the above.
[IMPROVED] Improved the stability of watched queries. Watched queries were previously susceptible to runtime crashes if an exception was thrown in the update stream. Errors are now gracefully handled.
[IMPROVED] Deprecated
PowerSyncCredentialsuserIdfield. This value is not used by the PowerSync service.[IMPROVED] Removed references to the PowerSync Kotlin SDK from all public API protocols. Dedicated Swift protocols are now defined. These protocols align better with Swift primitives. See the
BREAKING CHANGESsection above for more details, and see here for the complete list of updated protocols.[IMPROVED] Database and transaction/lock level query
executemethods now have@discardableResultannotation.[IMPROVED] Query methods'
parameterstyping has been updated to[Any?]from[Any]. This makes passingnilor optional values to queries easier.[IMPROVED]
AttachmentContext,AttachmentQueue,AttachmentServiceandSyncingServiceare are now explicitly declared asopenclasses, allowing them to be subclassed outside the defining module.[ADDED] Added
readLockandwriteLockAPIs. These methods allow obtaining a SQLite connection context without starting a transaction.
1.0.0-Beta.12
[ADDED] Introduced attachment sync helpers and a demo to showcase these. Learn how to get started here.
[FIXED] Cancellations in watched queries are now handled correctly.
1.0.0-Beta.11
[FIXED] Deadlock issue when
connect()is called immediately after opening a database (introduced in 1.0.0-Beta.10).
1.0.0-Beta.10
[ADDED] The ability to enable custom logging. See docs here.
[ADDED]
.close()method onPowerSyncDatabaseProtocolto close a database connection.[FIXED] Updated the
powersync-kotlindependency to version1.0.0-BETA29, which fixes these issues:Fixed a potential race condition between jobs in
connect()anddisconnect().Fixed a race condition causing data received during uploads not to be applied.
Fixed an issue where automatic driver migrations would fail with the error:
Sqlite operation failure database is locked attempted to run migration and failed. closing connection
1.0.0-Beta.9
[ADDED] Enabled Full Text Search on iOS platforms. An example implementation is not yet available, however our JavaScript implementations can be used as a guide in the mean time, or reach out to us on Discord. (PR #145)
[ADDED] For advanced use cases: The ability to update the schema for existing PowerSync clients using
updateSchema(). (PR #154)[IMPROVED] Unified concurrency model across platforms by introducing a pool of read connections and a single write connection, simplifying driver implementation and enabling concurrent reads. This also brings the architecture in line with other PowerSync SDKs. (PR #145)
[IMPROVED] Added queuing protection and warnings when connecting multiple PowerSync clients to the same database file, avoiding inconsistent state issues and improving the reliability of watched queries. (PR #146)
[IMPROVED] Switched to statically linking SQLite on native platforms since dynamic extension loading is disabled on Apple platforms. (PR #147)
[FIXED] A bug where local only, insert only and view name overrides were not applied for schema tables. (PR #154)
[FIXED] Updated powersync-sqlite-core to v0.3.12, which fixes
powersync_last_synced_at()returning stale information.
1.0.0-Beta.8
[ADDED] Support for sync bucket priorities to sync critical data first. Learn more.
[ADDED] The ability to throttle watched queries via the optional
throttleMsparameter. This will prevent these queries from re-running within the specified duration and therefore reduce the load for frequently updating tables.[IMPROVED] Internally improved the query logic for
watch()queries, by optimizing table update handling, enhancing thread safety, and simplifying the implementation (see the PR).[FIXED] The
uploadinganddownloadingSync Status indicators not correctly emitting status events.
1.0.0-Beta.7
[FIXED] An issue where throwing exceptions in the query
mappercould cause a runtime crash.[IMPROVED] Internally improved type casting.
[IMPROVED] Internals of the
watch()query.
1.0.0-Beta.6
[BREAKING CHANGE]:
watchqueries are now throwable and therefore will need to be accompanied by atrye.g.
try database.watch()[BREAKING CHANGE]:
transactionfunctions are now throwable and therefore will need to be accompanied by atrye.g.
try await database.writeTransaction { transaction in
try transaction.execute(...)
}[IMPROVED] Allow
executeerrors to be handled[IMPROVED]
userIdis now set tonilby default and therefore it is no longer required to be set tonilwhen instantiatingPowerSyncCredentialsand can therefore be left out.
1.0.0-Beta.5
[IMPROVED] Error handling for errors originating in the Kotlin SDK.
[IMPROVED]
__fetchCredentialsto log the error but not cause an app crash on error.
1.0.0-Beta.4
[IMPROVED] Ability to use the column name to get the pertaining value when using the cursor instead of having to use the index number. The following functions now accept a column name parameter:
getBoolean,getBooleanOptional,getString,getStringOptional,getLong,getLongOptional,getDouble,getDoubleOptional.BREAKING CHANGE: This should not affect anyone, but we made
KotlinPowerSyncCredentials,KotlinPowerSyncDatabaseandKotlinPowerSyncBackendConnectorprivate as these should never have been public.
1.0.0-Beta.3
BREAKING CHANGE: Updates the underlying
powersync-kotlinpackage to BETA18.0 which requires transactions to become synchronous as opposed to asynchronous.Previously:
try await database.writeTransaction { transaction in try await transaction.execute( sql: "INSERT INTO users (id, name, email) VALUES (?, ?, ?)", parameters: ["1", "Test User", "test@example.com"] ) }Now:
try await database.writeTransaction { transaction in transaction.execute( // <- This has become synchronous sql: "INSERT INTO users (id, name, email) VALUES (?, ?, ?)", parameters: ["1", "Test User", "test@example.com"] ) }
1.0.0-Beta.2
[FIXED] Updated
powersync-sqlite-coreto v0.3.8, which fixes a view migration issue (see details).[IMPROVED] Increase maximum amount of columns from 63 to 1999.
1.0.0-Beta.1
Initial Beta Release.