Windows
Install Nitro SQLite in a packaged React Native Windows app.
SQLite stores a database in a local file and can create journal files beside it. On Windows, Nitro SQLite uses the packaged app's per-user LocalState directory by default. Pass an app-controlled database name and relative location when selecting a subdirectory. The database path rules allow path components such as .., so a supplied path can resolve outside LocalState.
Use a packaged WinAppSDK x64 app with the React Native Windows 0.85 C++ template and its matching React Native version. Follow the React Native Windows setup guide for Visual Studio and Windows SDK requirements.
Install Nitro SQLite and pin Nitro Modules to exactly 0.37.2. The Windows build rejects every other Nitro Modules version, including newer versions. The broader peer dependency range applies to the other platforms:
npm install --save-exact react-native-nitro-sqlite react-native-nitro-modules@0.37.2Add this dependency override to your app's react-native.config.js. Nitro SQLite's Windows project builds the Nitro runtime and registers the NitroModules provider.
module.exports = {
dependencies: {
'react-native-nitro-modules': { platforms: { windows: null } },
},
}Rebuild the app to autolink Nitro SQLite:
npx react-native run-windows --arch x64Use the same database lifecycle API as on the other native platforms. Reading a BLOB on Windows copies its bytes into a JavaScript ArrayBuffer.
The Windows DLL builds its own Nitro core and registers the app's single NitroModules provider. A second library that bundles another Nitro core, or a future Windows implementation of react-native-nitro-modules, conflicts with that provider and its separate HybridObject registry. Objects registered by one library can then be unavailable to the other. Do not autolink two providers. If another library needs its own Windows Nitro runtime, use separate app configurations until both libraries support a shared runtime. Disabling a provider alone does not join their registries.
Windows uses bundled SQLite with thread safety, RTree, and the same default performance-mode flags as the other platforms. Use single quotes for SQL strings. WAL databases default to synchronous = NORMAL; set PRAGMA synchronous = FULL per connection if you need that durability.
The Windows project does not read the nitroSQLite block in your app's package.json. threadSafe, performanceMode, and enableRTree are fixed on. enableBatchAtomicWrite, Android's nitroSqliteFlags, and the Apple environment and Pod settings do not configure Windows. Custom SQLite flags, system SQLite, SQLite SEE, and sqlite-vec are unsupported.
Use a packaged x64 app. Unpackaged apps return an initialization error that explains the packaged-app requirement. ARM64 and Nitro V1 are unsupported.
SQLite warnings and errors appear in Visual Studio's Debug Output through OutputDebugStringW, including in Release builds. Attach a debugger to the app process to read them. Messages can include database and table names and exception text without redaction. Avoid sensitive data in those identifiers, and review captured diagnostics before sharing them.