Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let package = Package(
name: packageName,
platforms: [
.iOS(.v13),
.macOS(.v10_15)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
Expand All @@ -27,7 +28,8 @@ let package = Package(
dependencies: [
.product(name: "PowerSyncKotlin", package: "powersync-kotlin"),
.product(name: "PowerSyncSQLiteCore", package: "powersync-sqlite-core-swift")
]),
]
),
.testTarget(
name: "PowerSyncTests",
dependencies: ["PowerSync"]
Expand Down
4 changes: 2 additions & 2 deletions Sources/PowerSync/PowerSyncBackendConnectorAdapter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PowerSyncBackendConnectorAdapter: KotlinPowerSyncBackendConnector {
let result = try await swiftBackendConnector.fetchCredentials()
return result?.kotlinCredentials
} catch {
if #available(iOS 14.0, *) {
if #available(iOS 14.0, macOS 11.0, *) {
Logger().error("🔴 Failed to fetch credentials: \(error.localizedDescription)")
} else {
print("🔴 Failed to fetch credentials: \(error.localizedDescription)")
Expand All @@ -28,7 +28,7 @@ class PowerSyncBackendConnectorAdapter: KotlinPowerSyncBackendConnector {
do {
return try await swiftBackendConnector.uploadData(database: swiftDatabase)
} catch {
if #available(iOS 14.0, *) {
if #available(iOS 14.0, macOS 11.0, *) {
Logger().error("🔴 Failed to upload data: \(error)")
} else {
print("🔴 Failed to upload data: \(error)")
Expand Down