From a5dd771a8164f4f4566671e99e0f1cf1e8781c32 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Tue, 5 Aug 2025 16:36:59 +0200 Subject: [PATCH 1/3] Update Kotlin SDK to 1.3.1 --- Package.swift | 4 ++-- .../Kotlin/KotlinPowerSyncDatabaseImpl.swift | 6 ------ .../Protocol/PowerSyncDatabaseProtocol.swift | 11 ----------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/Package.swift b/Package.swift index 74410da..9596dc4 100644 --- a/Package.swift +++ b/Package.swift @@ -31,8 +31,8 @@ if let kotlinSdkPath = localKotlinSdkOverride { // Not using a local build, so download from releases conditionalTargets.append(.binaryTarget( name: "PowerSyncKotlin", - url: "https://github.com/powersync-ja/powersync-kotlin/releases/download/v1.3.0/PowersyncKotlinRelease.zip", - checksum: "5351c0a89e74ceaad570cd5c016c8ea4b8e10dc404daff3c20485ae0b6b989fa" + url: "https://github.com/powersync-ja/powersync-kotlin/releases/download/v1.3.1/PowersyncKotlinRelease.zip", + checksum: "b01b72cbf88a2e7b9b67efce966799493fc48d4523b5989d8c645ed182880975" )) } diff --git a/Sources/PowerSync/Kotlin/KotlinPowerSyncDatabaseImpl.swift b/Sources/PowerSync/Kotlin/KotlinPowerSyncDatabaseImpl.swift index ccfcd3a..ec5ea39 100644 --- a/Sources/PowerSync/Kotlin/KotlinPowerSyncDatabaseImpl.swift +++ b/Sources/PowerSync/Kotlin/KotlinPowerSyncDatabaseImpl.swift @@ -52,11 +52,6 @@ final class KotlinPowerSyncDatabaseImpl: PowerSyncDatabaseProtocol { ) let resolvedOptions = options ?? ConnectOptions() - let useWebsockets = switch (resolvedOptions.connectionMethod) { - case .http: false - case .webSocket: true - } - try await kotlinDatabase.connect( connector: connectorAdapter, crudThrottleMs: Int64(resolvedOptions.crudThrottle * 1000), @@ -64,7 +59,6 @@ final class KotlinPowerSyncDatabaseImpl: PowerSyncDatabaseProtocol { params: resolvedOptions.params.mapValues { $0.toKotlinMap() }, options: createSyncOptions( newClient: resolvedOptions.newClientImplementation, - webSocket: useWebsockets, userAgent: "PowerSync Swift SDK" ) ) diff --git a/Sources/PowerSync/Protocol/PowerSyncDatabaseProtocol.swift b/Sources/PowerSync/Protocol/PowerSyncDatabaseProtocol.swift index c8b63c2..6fb6109 100644 --- a/Sources/PowerSync/Protocol/PowerSyncDatabaseProtocol.swift +++ b/Sources/PowerSync/Protocol/PowerSyncDatabaseProtocol.swift @@ -41,14 +41,6 @@ public struct ConnectOptions { /// We encourage interested users to try the new client. @_spi(PowerSyncExperimental) public var newClientImplementation: Bool - - /// The connection method used to connect to the Powersync service. - /// - /// The default method is ``ConnectionMethod/http``. Using ``ConnectionMethod/webSocket(_:)`` can - /// improve performance as a more efficient binary protocol is used. However, using the websocket connection method - /// requires enabling ``ConnectOptions/newClientImplementation``. - @_spi(PowerSyncExperimental) - public var connectionMethod: ConnectionMethod /// Initializes a `ConnectOptions` instance with optional values. /// @@ -65,7 +57,6 @@ public struct ConnectOptions { self.retryDelay = retryDelay self.params = params self.newClientImplementation = false - self.connectionMethod = .http } /// Initializes a ``ConnectOptions`` instance with optional values, including experimental options. @@ -75,13 +66,11 @@ public struct ConnectOptions { retryDelay: TimeInterval = 5, params: JsonParam = [:], newClientImplementation: Bool = false, - connectionMethod: ConnectionMethod = .http ) { self.crudThrottle = crudThrottle self.retryDelay = retryDelay self.params = params self.newClientImplementation = newClientImplementation - self.connectionMethod = connectionMethod } } From 77195f122fd353300960f0bb54f0431177b8f23e Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Tue, 5 Aug 2025 16:37:44 +0200 Subject: [PATCH 2/3] Add changelog entry --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac6fe39..69b0089 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.3.1 + +* Update SQLite to 3.50.3. +* Support receiving binary sync lines over HTTP when the Rust client is enabled. +* Remove the experimental websocket transport mode. + ## 1.3.0 * Use version `0.4.2` of the PowerSync core extension, which improves the reliability From 49fac6689eaea41a537a00d9b7eb83ac4e1b20e0 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Tue, 5 Aug 2025 16:41:51 +0200 Subject: [PATCH 3/3] Remove trailing comma --- .../PowerSync/Protocol/PowerSyncDatabaseProtocol.swift | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Sources/PowerSync/Protocol/PowerSyncDatabaseProtocol.swift b/Sources/PowerSync/Protocol/PowerSyncDatabaseProtocol.swift index 6fb6109..68c9bd4 100644 --- a/Sources/PowerSync/Protocol/PowerSyncDatabaseProtocol.swift +++ b/Sources/PowerSync/Protocol/PowerSyncDatabaseProtocol.swift @@ -65,7 +65,7 @@ public struct ConnectOptions { crudThrottle: TimeInterval = 1, retryDelay: TimeInterval = 5, params: JsonParam = [:], - newClientImplementation: Bool = false, + newClientImplementation: Bool = false ) { self.crudThrottle = crudThrottle self.retryDelay = retryDelay @@ -74,12 +74,6 @@ public struct ConnectOptions { } } -@_spi(PowerSyncExperimental) -public enum ConnectionMethod { - case http - case webSocket -} - /// A PowerSync managed database. /// /// Use one instance per database file.