Skip to content

Commit 9bdba19

Browse files
committed
Support macOS
1 parent 9cb306f commit 9bdba19

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Package.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ let package = Package(
88
name: packageName,
99
platforms: [
1010
.iOS(.v13),
11+
.macOS(.v10_15)
1112
],
1213
products: [
1314
// Products define the executables and libraries a package produces, making them visible to other packages.
@@ -27,7 +28,8 @@ let package = Package(
2728
dependencies: [
2829
.product(name: "PowerSyncKotlin", package: "powersync-kotlin"),
2930
.product(name: "PowerSyncSQLiteCore", package: "powersync-sqlite-core-swift")
30-
]),
31+
]
32+
),
3133
.testTarget(
3234
name: "PowerSyncTests",
3335
dependencies: ["PowerSync"]

Sources/PowerSync/PowerSyncBackendConnectorAdapter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class PowerSyncBackendConnectorAdapter: KotlinPowerSyncBackendConnector {
1414
let result = try await swiftBackendConnector.fetchCredentials()
1515
return result?.kotlinCredentials
1616
} catch {
17-
if #available(iOS 14.0, *) {
17+
if #available(iOS 14.0, macOS 11.0, *) {
1818
Logger().error("🔴 Failed to fetch credentials: \(error.localizedDescription)")
1919
} else {
2020
print("🔴 Failed to fetch credentials: \(error.localizedDescription)")
@@ -28,7 +28,7 @@ class PowerSyncBackendConnectorAdapter: KotlinPowerSyncBackendConnector {
2828
do {
2929
return try await swiftBackendConnector.uploadData(database: swiftDatabase)
3030
} catch {
31-
if #available(iOS 14.0, *) {
31+
if #available(iOS 14.0, macOS 11.0, *) {
3232
Logger().error("🔴 Failed to upload data: \(error)")
3333
} else {
3434
print("🔴 Failed to upload data: \(error)")

0 commit comments

Comments
 (0)