DATE:
AUTHOR:
PowerSync Product Team
Swift SDK

GRDB Integration (Alpha) for PowerSync Swift

DATE:
AUTHOR: PowerSync Product Team

We’re excited to announce the alpha release of the GRDB integration for the PowerSync Swift SDK, available in v1.9.0.

Many developers prefer not to interact with their data through raw SQL queries, which can be error-prone and harder to maintain as apps grow. This release lets you combine PowerSync’s sync capabilities with GRDB’s powerful SQLite tooling, including type-safe Swift query APIs.

Overview

At a high level, the GRDB integration lets PowerSync and GRDB work against the same SQLite database on the client. PowerSync focuses on syncing, while GRDB can be used for querying, reactivity, and other application-level data access.

Both APIs operate safely on the same database, so you can use whichever one makes sense for a given task.

What is GRDB?

GRDB is a mature and widely-used SQLite framework in the Swift ecosystem. It gives you a clean, Swift-friendly way to work with SQLite, including type-safe ORM-style queries, reactive database observation, migrations, and robust concurrency handling, with first-class SwiftUI support via GRDBQuery.

If you’re already using GRDB, this integration lets you add PowerSync without reworking your existing data layer or changing how your app accesses data.

What This Integration Adds

We’ve heard from many teams who already use GRDB and want to add PowerSync’s sync and offline-first capabilities, but don’t want to rewrite their models or switch away from APIs they know. This integration is designed to make that path low-friction: you keep using GRDB for data access, and PowerSync handles sync.

For existing PowerSync Swift users who aren’t using GRDB yet, the integration also brings some practical benefits:

  • Access to GRDB’s ecosystem of libraries, including GRDBQuery for SwiftUI-friendly, reactive data access

  • The option to use type-safe model-based queries instead of raw SQL for most application queries

  • Direct access to SQLite connections for advanced use cases, such as registering custom SQLite functions

Get Started

GRDB support was introduced in PowerSync Swift SDK v1.9.0.

Follow the setup instructions in our docs to get started, or try out the demo.

Feedback and Help

The GRDB integration is in an alpha release, and we’d love your feedback.

If you run into issues, have questions, or want to help shape this integration:

We also recommend reviewing the documentation for the current alpha limitations and known issues.

Powered by LaunchNotes