PowerSync is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side.
This is the PowerSync SDK for Swift clients. The SDK reference is available here.
This SDK is currently in a beta release it is suitable for production use, given you have tested your use case(s) extensively. If you find a bug or issue, please open a GitHub issue. Questions or feedback can be posted on our community Discord - we'd love to hear from you.
-
- This is the Swift SDK implementation.
The easiest way to test the PowerSync Swift SDK is to run our demo application.
- Demo/PowerSyncExample: A simple to-do list application demonstrating the use of the PowerSync Swift SDK using a Supabase connector.
Add
dependencies: [
...
.package(url: "https://github.com/powersync-ja/powersync-swift", exact: "<version>")
],
targets: [
.target(
name: "YourTargetName",
dependencies: [
...
.product(
name: "PowerSync",
package: "powersync-swift"
),
]
)
]
to your Package.swift
file and pin the dependency to a specific version. The version is required because the package is in beta.
to your Package.swift
file and pin the dependency to a specific version. This is required because the package is in beta.
The PowerSync Swift SDK currently makes use of the PowerSync Kotlin Multiplatform SDK with the API tool SKIE and KMMBridge under the hood to help generate and publish a native Swift package. We will move to an entirely Swift native API in v1 and do not expect there to be any breaking changes. For more details, see the Swift SDK reference.
See these developer notes if you are migrating from the alpha to the beta version of the Swift SDK.