Skip to content

Commit

Permalink
fix: Use install_modules_dependencies for React iOS dependencies, f…
Browse files Browse the repository at this point in the history
…ix RN 0.75 new arch (#4040)
  • Loading branch information
oblador committed Aug 23, 2024
1 parent 0abe24e commit 1b565f2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Use `install_modules_dependencies` for React iOS dependencies ([#4040](https://github.com/getsentry/sentry-react-native/pull/4040))

## 5.30.0

### Features
Expand Down
37 changes: 22 additions & 15 deletions RNSentry.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,32 @@ Pod::Spec.new do |s|

s.preserve_paths = '*.js'

s.dependency 'React-Core'
s.dependency 'Sentry/HybridSDK', '8.34.0'

s.source_files = 'ios/**/*.{h,m,mm}'
s.public_header_files = 'ios/RNSentry.h'

s.compiler_flags = other_cflags
# This guard prevent to install the dependencies when we run `pod install` in the old architecture.
if is_new_arch_enabled then
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"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 'Sentry/HybridSDK', '8.34.0'

if defined? install_modules_dependencies
# Default React Native dependencies for 0.71 and above (new and legacy architecture)
install_modules_dependencies(s)
else
s.dependency 'React-Core'

if is_new_arch_enabled then
# New Architecture on React Native 0.70 and older
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"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

if is_using_hermes then
Expand Down

0 comments on commit 1b565f2

Please sign in to comment.