Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,11 @@ Vector search is an opt-in companion package. It statically links sqlite-vec int
npm install react-native-nitro-sqlite-vec
```
2. Enable it for each native platform, then rebuild the app:
- **iOS:** run CocoaPods with `NITRO_SQLITE_VEC=1`, for example:
- **Apple platforms (iOS, macOS, visionOS):** run CocoaPods with `NITRO_SQLITE_VEC=1`, for example:
```bash
NITRO_SQLITE_VEC=1 npx pod-install
```
For React Native macOS, run `NITRO_SQLITE_VEC=1 pod install` from `macos/`.
- **Android:** add this to `android/gradle.properties`:
```properties
nitroSqliteVec=true
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native-nitro-sqlite-vec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ Install both this package and `react-native-nitro-sqlite`, then enable the nativ
npm install react-native-nitro-sqlite react-native-nitro-sqlite-vec
```

- **iOS:**
- **Apple platforms (iOS, macOS, visionOS):**
```bash
NITRO_SQLITE_VEC=1 npx pod-install
```
For React Native macOS, run `NITRO_SQLITE_VEC=1 pod install` from `macos/`.
- **Android:** add this to `android/gradle.properties` and rebuild:
```properties
nitroSqliteVec=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))

# iOS opt-in (NITRO_SQLITE_VEC=1); compile sqlite-vec and static-link into the core's sqlite3.
# Apple-platform opt-in (NITRO_SQLITE_VEC=1); compile sqlite-vec and static-link into the core's sqlite3.
nitro_sqlite_vec = ENV['NITRO_SQLITE_VEC'] == '1'

# The core's bundled sqlite3.h (compiled with SQLITE_CORE to link it directly).
Expand All @@ -15,7 +15,11 @@ Pod::Spec.new do |s|
s.homepage = "https://github.com/margelo/react-native-nitro-sqlite"
s.license = "MIT"
s.authors = "Margelo"
s.platforms = { :ios => min_ios_version_supported, :visionos => "1.0" }
s.platforms = {
:ios => min_ios_version_supported,
:visionos => "1.0",
:osx => "10.13",
}
s.source = { :git => "https://github.com/margelo/react-native-nitro-sqlite.git", :tag => "#{s.version}" }

if nitro_sqlite_vec
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-nitro-sqlite-vec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"vector-search",
"nitro-modules",
"ios",
"macos",
"android"
],
"repository": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Android compiles these sources via the core's CMake, so autolink iOS only.
// CocoaPods autolinks this package on Apple platforms; Android compiles it via the core's CMake.
module.exports = {
dependency: {
platforms: {
ios: {},
macos: {},
android: null,
},
},
Expand Down
Loading