Skip to content
Open
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,7 @@ lib/
cbl-reactnative-docs/
couchbase-lite-ios/
couchbase-lite-java-common-android-release-*/
ios-swift-quickstart/
ios-swift-quickstart/

# Local planning notes (not for version control)
TURBO_MIGRATION_PLAN.md
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ src/cblite-js/cblite-tests
expo-example
couchbase-lite-ios
ios-swift-quickstart
cbl-reactnative-docs
cbl-reactnative-docs
24 changes: 1 addition & 23 deletions cbl-reactnative.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'

Pod::Spec.new do |s|
s.name = "cbl-reactnative"
Expand All @@ -18,26 +17,5 @@ Pod::Spec.new do |s|
s.dependency 'CouchbaseLite-Swift-Enterprise', '3.3.0'
s.source_files = "ios/**/*.{h,m,mm,swift}"

# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
else
s.dependency "React-Core"

# Don't install the dependencies when we run `pod install` in the old architecture.
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
}
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
end
end
install_modules_dependencies(s)
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install_modules_dependencies is only available in React Native >= 0.71 (as noted in the removed comment). Calling it unconditionally will raise an error during pod install on older RN versions / older CocoaPods scripts. Either restore the respond_to?(:install_modules_dependencies, true) guard with the legacy dependency branch, or explicitly document/enforce the minimum supported RN version so consumers can’t end up with a broken install.

Suggested change
install_modules_dependencies(s)
if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
else
raise "cbl-reactnative requires React Native >= 0.71 for CocoaPods integration (`install_modules_dependencies` is unavailable in this environment)."
end

Copilot uses AI. Check for mistakes.
end
Loading