Skip to content

Update powersync-kotlin version #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Update powersync-kotlin version
  • Loading branch information
simolus3 committed Apr 15, 2025
commit 4b9dc79e90430dc88050968dfef233e837a78dff
1 change: 1 addition & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ jobs:
- name: Build and Test
run: |
xcodebuild test -scheme PowerSync -destination "platform=iOS Simulator,name=iPhone 15"
xcodebuild test -scheme PowerSync -destination "platform=macOS,arch=arm64,name=My Mac"
4 changes: 2 additions & 2 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 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 @@ -16,7 +17,7 @@ let package = Package(
targets: ["PowerSync"]),
],
dependencies: [
.package(url: "https://github.com/powersync-ja/powersync-kotlin.git", exact: "1.0.0-BETA28.0"),
.package(url: "https://github.com/powersync-ja/powersync-kotlin.git", exact: "1.0.0-BETA29.0"),
.package(url: "https://github.com/powersync-ja/powersync-sqlite-core-swift.git", "0.3.12"..<"0.4.0")
],
targets: [
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