macOS
Installation, database storage, and Apple build options.
Use Nitro SQLite 10.x and Nitro Modules 0.37.2 in a CocoaPods-based React Native macOS app. The 10.x SQLite pod declares macOS 10.15, and the app must also meet the minimums of React Native macOS and Xcode. React Native macOS 0.81 and 0.83 both require macOS 14.
The 11.0.0 alpha requires React Native 0.88 or later. React Native macOS 0.83 lacks JSI APIs that Nitro V1 uses.
Install the 10.x packages, then install Pods and rebuild:
npm install react-native-nitro-sqlite@10 react-native-nitro-modules@0.37.2
cd macos && pod installDatabases use an app-specific Application Support directory. See file locations for the location option. Sandboxed apps can access only their permitted containers.
Apple build options
Use Configuration for shared package.json settings. For system SQLite, environment overrides, and additional compile flags, use the 10.x CocoaPods options from macos.
For vector search, install react-native-nitro-sqlite-vec@10 and run NITRO_SQLITE_VEC=1 pod install from macos. Rebuild and follow the vector search guide.
Run the example
Use the example from the 10.4.0 tag. It requires macOS 14 or later. Install its workspace and Ruby dependencies, then run the pods:macos and macos scripts. To run Metro separately, use the start script and pass --no-packager to macos. For a release build, pass --mode Release --no-packager.