diff --git a/README.md b/README.md index 433f45a5..663ab440 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/packages/react-native-nitro-sqlite-vec/README.md b/packages/react-native-nitro-sqlite-vec/README.md index 934246fb..d1487a74 100644 --- a/packages/react-native-nitro-sqlite-vec/README.md +++ b/packages/react-native-nitro-sqlite-vec/README.md @@ -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 diff --git a/packages/react-native-nitro-sqlite-vec/RNNitroSqliteVec.podspec b/packages/react-native-nitro-sqlite-vec/RNNitroSqliteVec.podspec index 18ebface..56b6bd5c 100644 --- a/packages/react-native-nitro-sqlite-vec/RNNitroSqliteVec.podspec +++ b/packages/react-native-nitro-sqlite-vec/RNNitroSqliteVec.podspec @@ -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). @@ -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 diff --git a/packages/react-native-nitro-sqlite-vec/package.json b/packages/react-native-nitro-sqlite-vec/package.json index f67e4ab3..0f364b0a 100644 --- a/packages/react-native-nitro-sqlite-vec/package.json +++ b/packages/react-native-nitro-sqlite-vec/package.json @@ -29,6 +29,7 @@ "vector-search", "nitro-modules", "ios", + "macos", "android" ], "repository": { diff --git a/packages/react-native-nitro-sqlite-vec/react-native.config.js b/packages/react-native-nitro-sqlite-vec/react-native.config.js index ba3ab018..2faef343 100644 --- a/packages/react-native-nitro-sqlite-vec/react-native.config.js +++ b/packages/react-native-nitro-sqlite-vec/react-native.config.js @@ -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, }, },