Kotlin Multiplatform
Kotlin Multiplatform
This path is for Kotlin Multiplatform apps using the SQLiteNow Gradle plugin and KMP runtime libraries. It covers Android, iOS, JVM, macOS, Linux, JavaScript, and Kotlin/Wasm targets. macOS targets, the JVM runtime on macOS, and repository development on macOS require Apple Silicon; Intel macOS is not supported.
Web Runtime
Generated and handwritten databases use the packaged SQLite worker through
BundledSqliteConnectionProvider by default. JS and Wasm browsers persist
directly to deterministic OPFS targets. They require a secure context, Web
Crypto, Web Locks, OPFS, official SQLite OpfsDb, and the COOP/COEP/CSP policy
listed in the packaged worker manifest. Unsupported browsers fail clearly
without a snapshot, IndexedDB operational, or in-memory fallback.
JS Node uses a transient in-memory worker, so close/reopen begins empty. Android, JVM, iOS arm64, macOS arm64, and Linux continue to open their normal SQLite files in place.
Start Here
The getting-started guide is a complete walkthrough: apply the Gradle plugin, add the runtime dependency, configure a database, create SQL files, generate KMP code, and wire platform SQLite drivers.
SQL Reference
Reference topics use the same SQL concepts as Flutter/Dart docs, but render KMP paths, generated Kotlin APIs, and Gradle plugin examples.
Recipes
Recipes cover common implementation patterns such as adapters, reactive flows, parameter inference, schema inspection, and nested result mapping.
Migrations
Migration files define how existing app databases move between schema versions. Fresh databases are bootstrapped from the current schema, while existing databases run versioned upgrade SQL.
Sync
The KMP sync docs cover client setup, bootstrap, sync operations, reactive updates, and server integration.
Tutorials
The tutorial series walks through a Kotlin Multiplatform app from project setup to generated SQL APIs and reactive UI.