Skip to content

Commit

Permalink
Use install_modules_dependencies by default in RNWorklets.podspec (#…
Browse files Browse the repository at this point in the history
…6950)

## Summary

`respond_to?(:install_modules_dependencies, true)` returns true on RN
0.71+ and currently we support RN 0.74+ so it's high time to remove the
conditional in RNWorklets.podspec and always call
`install_modules_dependencies`.

## Test plan
  • Loading branch information
tomekzaw authored Jan 28, 2025
1 parent 47cc2f9 commit b9fcec9
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions packages/react-native-worklets/RNWorklets.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,9 @@ Pod::Spec.new do |s|
end
end

# 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
# Use install_modules_dependencies helper to install the dependencies.
# See https://github.com/facebook/react-native/blob/c925872e72d2422be46670777bfa2111e13c9e4c/packages/react-native/scripts/cocoapods/new_architecture.rb#L71.
install_modules_dependencies(s)

s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
Expand Down

0 comments on commit b9fcec9

Please sign in to comment.