GRDB.swift
GRDB.swift is a SQLite database toolkit for iOS/macOS/tvOS/watchOS applications, offering ORM-like record persistence, SQL generation, database observation, and multi-threaded access patterns. It bridges low-level SQLite with Swift-idiomatic APIs while allowing raw SQL when needed.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | groue/GRDB.swift |
| Owner | groue |
| Primary language | Swift |
| License | MIT — OSI-approved |
| Stars | 8.5k |
| Forks | 982 |
| Open issues | 8 |
| Latest release | v7.11.1 (2026-06-18) |
| Last updated | 2026-06-18 |
| Source | https://github.com/groue/GRDB.swift |
What GRDB.swift is
GRDB provides Codable-based record mapping (FetchableRecord, PersistableRecord), a query builder DSL, ValueObservation for reactive updates, WAL concurrency support, and migrations. It wraps SQLite 3.20.0+ and supports Swift 6.1+, requiring iOS 13.0+/macOS 10.15+/tvOS 13.0+/watchOS 7.0+.
Get the GRDB.swift source
Clone the repository and explore it locally.
git clone https://github.com/groue/GRDB.swift.gitcd GRDB.swift# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires Swift 6.1+ and modern Xcode (16.3+); ensure team uses compatible toolchain and deployment targets (iOS 13.0+ minimum).
- Schema design and migrations must be planned early; GRDB enforces structure but does not auto-generate schemas from Swift types.
- ValueObservation introduces reactive patterns; teams unfamiliar with Combine or async/await should budget learning time.
- Concurrency model (DatabaseQueue vs. DatabasePool) must match app architecture; incorrect choice can bottleneck multi-threaded apps.
- Testing requires in-memory or temporary database instances; integrate into CI pipeline from the start.
When to avoid it — and what to weigh
- Server-side backend database layer — GRDB is Swift-only and optimized for client-side SQLite. Server applications should use PostgreSQL, MySQL, or dedicated backend ORMs (ActiveRecord, Sequelize, SQLAlchemy).
- Cross-platform (non-Apple) mobile requirements — GRDB targets Apple platforms only. Android/Flutter/React Native projects need database solutions with broader platform support.
- Minimal dependencies and embedded environments — GRDB brings a non-trivial compiled footprint and Swift runtime dependency; embedded systems or dependency-critical contexts may prefer raw SQLite bindings.
- Need for distributed/networked databases — GRDB is local-database only. Applications requiring distributed transactions, sharding, or multi-node replication should use cloud-native databases (Firestore, Realm Cloud, etc.).
License & commercial use
Licensed under the MIT License, a permissive open-source license. MIT permits commercial use, modification, distribution, and private use without restriction, provided the license notice and copyright are retained.
MIT license clearly permits commercial use. No proprietary restrictions, licensing fees, or attribution requirements beyond retaining the original license text. Suitable for proprietary iOS/macOS app development.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
GRDB supports parameterized queries and SQL interpolation to prevent SQL injection. Review custom SQL for injection risks. SQLite encryption-at-rest is not built-in; use SQLCipher or platform keychain for sensitive data. No security audit information publicly available; assess risk based on app sensitivity and data classification.
Alternatives to consider
Core Data (Apple native)
Built into iOS/macOS; integrates with iCloud sync. Trade-offs: steeper learning curve, less SQL transparency, older API. Better for ecosystem lock-in; GRDB better for explicit control.
Realm (Realm Swift)
Cross-platform (iOS, Android, web); reactive by default; cloud sync option. Trade-offs: proprietary database format, subscription pricing for Realm Cloud. GRDB offers more direct SQLite control and full MIT freedom.
SQLite.swift (lightweight wrapper)
Minimal, type-safe SQLite wrapper without ORM overhead. Trade-offs: no built-in migrations, no observation layer, requires more manual SQL. GRDB better for full-featured apps needing observation and migrations.
Build on GRDB.swift with DEV.co software developers
GRDB.swift gives you full SQLite control with Swift ergonomics. Start with our technical review and integration roadmap.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
GRDB.swift FAQ
Does GRDB support iOS 12 or earlier?
Can I use GRDB with SwiftUI?
Is GRDB suitable for large datasets (100 GB+)?
How do I encrypt my database?
Custom software development services
DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If GRDB.swift is part of your open-source databases roadmap, our team can implement, customize, migrate, and maintain it.
Ready to build data-driven Apple apps?
GRDB.swift gives you full SQLite control with Swift ergonomics. Start with our technical review and integration roadmap.