Skip to content

Commit

Permalink
fix(ios): Use install_modules_dependencies in the podspec (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipolleschi authored Nov 30, 2023
1 parent 276101d commit 8dee28a
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions react-native-pager-view.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,27 @@ Pod::Spec.new do |s|

s.source_files = "ios/**/*.{h,m,mm}"

s.dependency "React-Core"
# install_modules_dependencies has been defined in RN 0.70
# This check ensure that the library can work on older versions of RN
if defined?(install_modules_dependencies)
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 = {
# 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"
s.dependency "React-RCTFabric"
}
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
s.dependency "React-RCTFabric"
end
end
end

0 comments on commit 8dee28a

Please sign in to comment.