Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

### Features

- Opt-in: consume sentry-cocoa via Swift Package Manager. Set `SENTRY_USE_SPM=1` before `pod install` to pull `Sentry` from sentry-cocoa's SPM package as a binary xcframework instead of the CocoaPods source build ([#6182](https://github.com/getsentry/sentry-react-native/pull/6182))
- Add `disableAutoUpload` option to Expo plugin to disable source map and debug symbol uploads ([#6195](https://github.com/getsentry/sentry-react-native/pull/6195))
- Expose `pauseAppHangTracking` and `resumeAppHangTracking` APIs on iOS ([#6192](https://github.com/getsentry/sentry-react-native/pull/6192))
- Better route and dynamic param extraction for Expo Router ([#6197](https://github.com/getsentry/sentry-react-native/pull/6197))
Expand Down
26 changes: 25 additions & 1 deletion packages/core/RNSentry.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,31 @@ Pod::Spec.new do |s|
'DEFINES_MODULE' => 'YES'
}

s.dependency 'Sentry', '9.14.0'
sentry_cocoa_version = '9.14.0'

# Opt-in to consuming sentry-cocoa via Swift Package Manager.
# When `SENTRY_USE_SPM=1` is set, RNSentry pulls `Sentry` from the
# sentry-cocoa SPM package as a binary xcframework instead of from
# the Sentry CocoaPods source build. Defaults to CocoaPods consumption
# for backward compatibility with the full RN version range we support.
#
# Requires React Native >= 0.75 because the SPM helper
# (`react-native/scripts/cocoapods/spm.rb`) is loaded transitively from
# the Podfile via `react_native_pods.rb`.
if ENV['SENTRY_USE_SPM'] == '1'
unless defined?(SPM) && SPM.respond_to?(:dependency)
raise 'SENTRY_USE_SPM=1 is set but the SPM helper is not loaded. ' \
'This requires React Native >= 0.75 and a Podfile that imports ' \
'react_native_pods.rb.'
end
SPM.dependency(s,
url: 'https://github.com/getsentry/sentry-cocoa',
requirement: { kind: 'exactVersion', version: sentry_cocoa_version },
products: ['Sentry']
Comment thread
alwx marked this conversation as resolved.
)
else
s.dependency 'Sentry', sentry_cocoa_version
end

if defined? install_modules_dependencies
# Default React Native dependencies for 0.71 and above (new and legacy architecture)
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-cocoa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail

file="$(dirname "$0")/../packages/core/RNSentry.podspec"
content=$(cat $file)
regex="('Sentry', *)'([0-9\.]+)'"
regex="(sentry_cocoa_version *= *)'([0-9\.]+)'"
if ! [[ $content =~ $regex ]]; then
echo "Failed to find the plugin version in $file"
exit 1
Expand Down
Loading