FMDB

What FMDB is
FMDB is a free Objective-C wrapper around SQLite for Cocoa developers working on iOS and macOS. Its FMDatabase type represents a database and executes SQL statements, while FMResultSet provides typed access to query columns. FMDatabaseQueue coordinates shared database access across multiple threads and supports transactions, including rollback. Queue calls are blocking, and code inside their blocks does not run on another thread. The project recommends SQLite placeholders with bound values rather than inserting values directly into SQL strings. Developers can create custom SQLite functions from blocks. FMDB works in Objective-C and Swift projects, with documented installation through CocoaPods, Carthage, and Swift Package Manager; Swift projects may also use Objective-C bridging headers. An SQLCipher subspec or package trait can compile encryption support. FMDB supports offline use but has no data synchronization. Community support is voluntary through its mailing list, GitHub issues, or Stack Overflow.
Who it suits
FMDB suits Cocoa developers who need SQLite access from Objective-C or Swift applications on iOS or macOS. It is useful when offline storage is needed without built-in synchronization.
What it does well
- Free plan costs nothing
- Supports Objective-C and Swift
- Provides typed query result accessors
- Coordinates multithreaded database access
- Offers SQLCipher compilation options
What to know first
- No data synchronization is provided
- Queue operations are blocking
- Community support is voluntary
- One database instance should not serve multiple threads
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| FMDB | Cocoa / Objective-C wrapper around SQLite · install via CocoaPods, Carthage, or Swift Package Manager | Free |
As github.com lists them, read 7 Oct 2026. The maker's own page has the final word.
Getting started
- Visit the FMDB GitHub project.
- Choose CocoaPods, Carthage, or Swift Package Manager as the documented installation route.
- For a Swift project, use Swift Package Manager or an Objective-C bridging header.
- Use FMDatabase to execute SQL statements and FMResultSet to read query results.
- Use FMDatabaseQueue when database access is shared across multiple threads.
Verdict
FMDB offers a focused SQLite wrapper with database, query, transaction, and concurrency helpers. Developers should account for its blocking queue behavior and community-based support.
Questions
How much does FMDB cost?
FMDB is free. Its listed FMDB plan is free.
Which platforms does FMDB support?
FMDB is available for iOS and macOS.
Can FMDB be used from Swift?
Yes. Swift projects can use FMDB through Swift Package Manager or Objective-C bridging headers.
Does FMDB support encryption?
The project describes an SQLCipher subspec or package trait for compiling FMDB with SQLCipher encryption support.
How does FMDB handle database access across threads?
FMDatabaseQueue coordinates shared access. The project warns against using one FMDatabase instance from multiple threads at once; queue calls block and their blocks do not run on another thread.
Where can users get support?
Community support is voluntary through the mailing list, GitHub bug reports, or Stack Overflow.
Facts from FMDB's own pages
- Concurrency
- FMDatabaseQueue synchronizes and coordinates database access across multiple threads. · github.com, 7 Oct 2026
- Custom functions
- FMDB supports creating custom SQLite functions based on blocks. · github.com, 7 Oct 2026
- Database access
- FMDatabase represents a SQLite database and is used to execute SQL statements. · github.com, 7 Oct 2026
- Encryption option
- The README describes using the SQLCipher subspec or package trait to compile FMDB with SQLCipher encryption support. · github.com, 7 Oct 2026
- Integrations
- The project documents installation through CocoaPods, Carthage, and Swift Package Manager, and describes SQLCipher options. · github.com, 7 Oct 2026
- Intended users
- The project is for Cocoa developers who want to work with SQLite through Objective-C or Swift. · github.com, 7 Oct 2026
- Parameter binding
- The README recommends SQLite placeholders and bound values, which its execution methods escape, instead of manually inserting values into SQL strings. · github.com, 7 Oct 2026
- Purpose
- FMDB is an Objective-C wrapper around SQLite. · github.com, 7 Oct 2026
- Query results
- FMResultSet represents the results of executing a query on an FMDatabase and offers typed column accessors. · github.com, 7 Oct 2026
- Queue behavior
- FMDatabaseQueue calls are blocking and its blocks do not run on another thread. · github.com, 7 Oct 2026
- Support
- Support is community-provided on a voluntary basis through the mailing list, GitHub bug reports, or Stack Overflow. · github.com, 7 Oct 2026
- Swift support
- FMDB can be used in Swift projects, including through Swift Package Manager and Objective-C bridging headers. · github.com, 7 Oct 2026
- Thread-safety limit
- The README warns against using one FMDatabase instance from multiple threads at once and recommends FMDatabaseQueue for shared access. · github.com, 7 Oct 2026
- Transactions
- FMDatabase and FMDatabaseQueue support transactions, including a queue method that can roll back a transaction. · github.com, 7 Oct 2026
Where FMDB stands on Freedom251
- Mobile Databases#11 of 26