Skip to content

Commit 7d0a032

Browse files
authored
Revert "Merge branch 'release/8.18.0-alpha.3'" (#6412)
This reverts commit fdb0688, reversing changes made to e5bb5f6.
1 parent fdb0688 commit 7d0a032

27 files changed

Lines changed: 65 additions & 341 deletions

File tree

.github/workflows/sample-application.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
caller_ref: ${{ github.ref }}
4444

4545
build-ios:
46-
name: Build ${{ matrix.rn-architecture }} ios ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }} ${{ matrix.sentry-consumption }}
46+
name: Build ${{ matrix.rn-architecture }} ios ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }}
4747
runs-on: macos-26-xlarge
4848
needs: [diff_check, detect-changes]
4949
if: >-
@@ -60,16 +60,6 @@ jobs:
6060
rn-architecture: ["new"]
6161
ios-use-frameworks: ["no-frameworks"]
6262
build-type: ["dev", "production"]
63-
sentry-consumption: ["xcframework"]
64-
# `xcframework` is the default: RNSentry vendors a prebuilt
65-
# `Sentry-Dynamic.xcframework` downloaded from sentry-cocoa's release.
66-
# Keep a single CocoaPods job to catch regressions in the source-build
67-
# fallback (`SENTRY_USE_XCFRAMEWORK=0`).
68-
include:
69-
- rn-architecture: "new"
70-
ios-use-frameworks: "no-frameworks"
71-
build-type: "production"
72-
sentry-consumption: "cocoapods"
7363
steps:
7464
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
7565

@@ -105,7 +95,6 @@ jobs:
10595
[[ "${{ matrix.build-type }}" == "production" ]] && export ENABLE_PROD=1 || export ENABLE_PROD=0
10696
[[ "${{ matrix.rn-architecture }}" == "new" ]] && export ENABLE_NEW_ARCH=1 || export ENABLE_NEW_ARCH=0
10797
[[ "${{ matrix.ios-use-frameworks }}" == "dynamic-frameworks" ]] && export USE_FRAMEWORKS=dynamic
108-
[[ "${{ matrix.sentry-consumption }}" == "cocoapods" ]] && export SENTRY_USE_XCFRAMEWORK=0
10998
11099
./scripts/pod-install.sh
111100
@@ -123,18 +112,15 @@ jobs:
123112
./scripts/build-ios.sh
124113
125114
- name: Archive iOS App
126-
# Only upload from the xcframework job (the default consumption path)
127-
# to avoid duplicate artifact names when the CocoaPods regression job
128-
# runs.
129-
if: ${{ matrix.rn-architecture == 'new' && matrix.build-type == 'production' && matrix.ios-use-frameworks == 'no-frameworks' && matrix.sentry-consumption == 'xcframework' }}
115+
if: ${{ matrix.rn-architecture == 'new' && matrix.build-type == 'production' && matrix.ios-use-frameworks == 'no-frameworks' }}
130116
working-directory: ${{ env.REACT_NATIVE_SAMPLE_PATH }}
131117
run: |
132118
zip -r \
133119
${{ github.workspace }}/${{ env.IOS_APP_ARCHIVE_PATH }} \
134120
sentryreactnativesample.app
135121
136122
- name: Upload iOS APP
137-
if: ${{ matrix.rn-architecture == 'new' && matrix.build-type == 'production' && matrix.ios-use-frameworks == 'no-frameworks' && matrix.sentry-consumption == 'xcframework' }}
123+
if: ${{ matrix.rn-architecture == 'new' && matrix.build-type == 'production' && matrix.ios-use-frameworks == 'no-frameworks' }}
138124
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
139125
with:
140126
name: sample-rn-${{ matrix.rn-architecture }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks}}-ios
@@ -145,7 +131,7 @@ jobs:
145131
if: ${{ always() }}
146132
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
147133
with:
148-
name: build-sample-${{ matrix.rn-architecture }}-ios-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks}}-${{ matrix.sentry-consumption }}-logs
134+
name: build-sample-${{ matrix.rn-architecture }}-ios-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks}}-logs
149135
path: ${{ env.REACT_NATIVE_SAMPLE_PATH }}/ios/*.log
150136

151137
build-android:

CHANGELOG.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@
66
> make sure you follow our [migration guide](https://docs.sentry.io/platforms/react-native/migration/) first.
77
<!-- prettier-ignore-end -->
88
9-
## 8.18.0-alpha.3
10-
11-
### Changes
12-
13-
- Consume `sentry-cocoa` as a prebuilt xcframework by default on iOS ([#6381](https://github.com/getsentry/sentry-react-native/pull/6381))
14-
15-
**Warning**
16-
17-
**This may be a breaking change for some setups.** `pod install` now downloads `Sentry.xcframework` from sentry-cocoa's GitHub release (SHA256-verified) and vendors it, instead of building Sentry from source as a CocoaPod. If your iOS build breaks after upgrading (e.g. when another pod also depends on the `Sentry` CocoaPod), or if your `pod install` environment cannot reach `github.com`, set `SENTRY_USE_XCFRAMEWORK=0` before `pod install` to restore the previous source-build behavior.
18-
199
## 8.17.2
2010

2111
### Fixes

SDK-VERSIONS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ To manually update the table with the current version, run `./scripts/update-sdk
1212

1313
| React Native SDK | Android SDK | Cocoa SDK | JavaScript SDK |
1414
| ---------------- | ----------- | --------- | -------------- |
15-
| [8.18.0-alpha.3](https://github.com/getsentry/sentry-react-native/releases/tag/8.18.0-alpha.3) | [8.47.0](https://github.com/getsentry/sentry-java/releases/tag/8.47.0) | [9.19.1](https://github.com/getsentry/sentry-cocoa/releases/tag/9.19.1) | [10.63.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.63.0) |
1615
| [8.17.2](https://github.com/getsentry/sentry-react-native/releases/tag/8.17.2) | [8.47.0](https://github.com/getsentry/sentry-java/releases/tag/8.47.0) | [9.19.1](https://github.com/getsentry/sentry-cocoa/releases/tag/9.19.1) | [10.63.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.63.0) |
1716
| [8.17.1](https://github.com/getsentry/sentry-react-native/releases/tag/8.17.1) | [8.47.0](https://github.com/getsentry/sentry-java/releases/tag/8.47.0) | [9.19.1](https://github.com/getsentry/sentry-cocoa/releases/tag/9.19.1) | [10.63.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.63.0) |
1817
| [8.17.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.17.0) | [8.47.0](https://github.com/getsentry/sentry-java/releases/tag/8.47.0) | [9.19.1](https://github.com/getsentry/sentry-cocoa/releases/tag/9.19.1) | [10.63.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.63.0) |

dev-packages/e2e-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-native-e2e-tests",
3-
"version": "8.18.0-alpha.3",
3+
"version": "8.17.2",
44
"private": true,
55
"description": "Sentry React Native End to End Tests Library",
66
"main": "dist/index.js",
@@ -14,7 +14,7 @@
1414
"@babel/preset-env": "^7.25.3",
1515
"@babel/preset-typescript": "^7.18.6",
1616
"@sentry/core": "10.63.0",
17-
"@sentry/react-native": "8.18.0-alpha.3",
17+
"@sentry/react-native": "8.17.2",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^19.1.4",
2020
"appium": "3.2.2",

dev-packages/type-check/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sentry-react-native-type-check",
33
"private": true,
4-
"version": "8.18.0-alpha.3",
4+
"version": "8.17.2",
55
"scripts": {
66
"type-check": "./run-type-check.sh"
77
}

dev-packages/utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-native-samples-utils",
3-
"version": "8.18.0-alpha.3",
3+
"version": "8.17.2",
44
"description": "Internal Samples Utils",
55
"main": "index.js",
66
"license": "MIT",

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "8.18.0-alpha.3",
3+
"version": "8.17.2",
44
"packages": [
55
"packages/*",
66
"dev-packages/*",

packages/core/RNSentry.podspec

Lines changed: 21 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -45,115 +45,41 @@ Pod::Spec.new do |s|
4545
# is pulled in here; on Android it is compiled by the dedicated CMake target
4646
# in `android/CMakeLists.txt`. The files are guarded with
4747
# `RCT_NEW_ARCH_ENABLED` so they compile to empty TUs on Old Arch.
48-
#
49-
# We include `.swift` (for `RNSentrySwiftLinkStub.swift`) only on RN >=
50-
# 0.75. Adding a Swift file makes CocoaPods treat RNSentry as a Swift
51-
# pod, which then requires modular headers from its ObjC dependencies
52-
# (React-Core, React-hermes) — RN < 0.75 doesn't emit those, so
53-
# `pod install` fails with:
54-
# "The Swift pod `RNSentry` depends upon `React-hermes`, which does
55-
# not define modules."
56-
# The stub is only needed when linking Sentry.xcframework's Swift
57-
# symbols into a dynamic framework anyway (RN 0.86+ `use_frameworks!
58-
# :dynamic`), so gating on RN 0.75 is safe.
59-
supports_swift_stub = rn_version[:major] >= 1 || (rn_version[:major] == 0 && rn_version[:minor] >= 75)
60-
if supports_swift_stub
61-
s.source_files = 'ios/**/*.{h,m,mm,swift}', 'cpp/**/*.{h,cpp}'
62-
s.swift_versions = ['5.5']
63-
else
64-
s.source_files = 'ios/**/*.{h,m,mm}', 'cpp/**/*.{h,cpp}'
65-
end
48+
s.source_files = 'ios/**/*.{h,m,mm}', 'cpp/**/*.{h,cpp}'
6649
s.public_header_files = 'ios/RNSentry.h', 'ios/RNSentrySDK.h', 'ios/RNSentryStart.h', 'ios/RNSentryVersion.h', 'ios/RNSentryBreadcrumb.h', 'ios/RNSentryReplay.h', 'ios/RNSentryReplayBreadcrumbConverter.h', 'ios/Replay/RNSentryReplayMask.h', 'ios/Replay/RNSentryReplayUnmask.h', 'ios/RNSentryTimeToDisplay.h'
6750

6851
s.compiler_flags = other_cflags
6952

70-
pod_target_xcconfig = {
53+
s.pod_target_xcconfig = {
7154
'DEFINES_MODULE' => 'YES'
7255
}
7356

7457
sentry_cocoa_version = '9.19.1'
7558

76-
# Consume sentry-cocoa as a prebuilt `Sentry.xcframework` by default.
59+
# Opt-in to consuming sentry-cocoa via Swift Package Manager.
60+
# When `SENTRY_USE_SPM=1` is set, RNSentry pulls `Sentry` from the
61+
# sentry-cocoa SPM package as a binary xcframework instead of from
62+
# the Sentry CocoaPods source build. Defaults to CocoaPods consumption
63+
# for backward compatibility with the full RN version range we support.
7764
#
78-
# The xcframework is downloaded from sentry-cocoa's GitHub Release,
79-
# SHA256-verified, and cached under `~/Library/Caches/sentry-react-native/
80-
# xcframeworks/<version>/` (override with `SENTRY_XCFRAMEWORK_CACHE_DIR`).
81-
# Slice paths are then wired into the pod and app target via
82-
# `FRAMEWORK_SEARCH_PATHS` below. Consuming the xcframework this way
83-
# avoids compiling sentry-cocoa from source (fast install) and
84-
# sidesteps the Xcode 16/26 archive bug that affects the same
85-
# xcframework when consumed through Xcode's SPM integration
86-
# (`Signatures/*.signature` collision during archive).
87-
#
88-
# Set `SENTRY_USE_XCFRAMEWORK=0` to fall back to the source-built
89-
# `Sentry` CocoaPod (e.g. for offline builds behind a restrictive proxy).
90-
#
91-
# `SENTRY_USE_SPM` was the name in earlier drafts of this PR; honor it as a
92-
# deprecated alias so CI or local envs still exporting `SENTRY_USE_SPM=0`
93-
# don't silently take the new xcframework path.
94-
env_use_xcframework = ENV['SENTRY_USE_XCFRAMEWORK']
95-
if env_use_xcframework.nil? && !ENV['SENTRY_USE_SPM'].nil?
96-
Pod::UI.warn '[Sentry] SENTRY_USE_SPM is deprecated; use SENTRY_USE_XCFRAMEWORK instead.' if defined?(Pod::UI)
97-
env_use_xcframework = ENV['SENTRY_USE_SPM']
98-
end
99-
use_xcframework = case env_use_xcframework
100-
when '0' then false
101-
else true
102-
end
103-
104-
if use_xcframework
105-
sentry_xcframework_dir = ensure_sentry_xcframework(sentry_cocoa_version, 'Sentry')
106-
107-
# We deliberately do NOT set `s.vendored_frameworks` even though the
108-
# xcframework is downloaded and referenced below. CocoaPods doesn't
109-
# stage vendored xcframeworks for `path:` (development) pods anyway
110-
# — it did nothing for us functionally — and pointing it at a path
111-
# inside `node_modules/@sentry/react-native/ios/Vendor/` used to be
112-
# actively harmful, because that path only existed when the SDK was
113-
# cached into the package directory (broken under pnpm's isolated
114-
# store / Yarn PnP where node_modules is read-only). Framework
115-
# linking still happens: `@import Sentry;` in RNSentry.mm + user
116-
# code triggers clang's `-fmodules-autolink`, which emits the
117-
# `-framework Sentry` linker directive automatically once the
118-
# module is discovered via `FRAMEWORK_SEARCH_PATHS` below.
119-
120-
# Xcode's `-F <dir>` doesn't descend into `.xcframework` bundles — it
121-
# looks for `Sentry.framework` directly at the given path. Point a
122-
# separate framework search path at each slice, gated by the matching
123-
# SDK selector so `#import <Sentry/…>` resolves against exactly one
124-
# slice per build. An unconditional search-path list would let Xcode's
125-
# Swift module precompiler stumble into a slice for a different arch
126-
# and fail with "unsupported Swift architecture".
127-
#
128-
# We hardcode the slice → SDK map in `SENTRY_XCFRAMEWORK_SLICES_BY_SDK`
129-
# (see `sentry_utils.rb`) rather than scanning the extracted bundle —
130-
# sentry-cocoa's `Sentry.xcframework` layout is stable across releases.
131-
# Add a slice there if a future release ships one.
132-
#
133-
# Point the search paths at the pod-install-time absolute path to the
134-
# xcframework. `${PODS_TARGET_SRCROOT}` is only defined in per-pod
135-
# xcconfigs, not in aggregate/user-target xcconfigs, and a
136-
# `${PODS_ROOT}`-relative fallback works for one Podfile layout but
137-
# breaks for another (e.g. the RN sample apps put node_modules at a
138-
# different depth from RNSentryCocoaTester). Using the absolute path
139-
# avoids the layout-detection dance — the path is regenerated on
140-
# every `pod install`, so it's not something anyone commits.
141-
xcframework_search_paths = SENTRY_XCFRAMEWORK_SLICES_BY_SDK.each_with_object({}) do |(sdk, slice_ids), acc|
142-
paths = slice_ids.map { |slice| %("#{File.join(sentry_xcframework_dir, slice)}") }
143-
acc["FRAMEWORK_SEARCH_PATHS[sdk=#{sdk}*]"] = (['$(inherited)'] + paths).join(' ')
65+
# Requires React Native >= 0.75 because the SPM helper
66+
# (`react-native/scripts/cocoapods/spm.rb`) is loaded transitively from
67+
# the Podfile via `react_native_pods.rb`.
68+
if ENV['SENTRY_USE_SPM'] == '1'
69+
unless defined?(SPM) && SPM.respond_to?(:dependency)
70+
raise 'SENTRY_USE_SPM=1 is set but the SPM helper is not loaded. ' \
71+
'This requires React Native >= 0.75 and a Podfile that imports ' \
72+
'react_native_pods.rb.'
14473
end
145-
146-
pod_target_xcconfig.merge!(xcframework_search_paths)
147-
s.user_target_xcconfig = xcframework_search_paths
74+
SPM.dependency(s,
75+
url: 'https://github.com/getsentry/sentry-cocoa',
76+
requirement: { kind: 'exactVersion', version: sentry_cocoa_version },
77+
products: ['Sentry']
78+
)
14879
else
14980
s.dependency 'Sentry', sentry_cocoa_version
15081
end
15182

152-
# Assign before `install_modules_dependencies` so it can merge its
153-
# RN-specific settings on top. Assigning after would clobber those and
154-
# break header resolution across the pod.
155-
s.pod_target_xcconfig = pod_target_xcconfig
156-
15783
if defined? install_modules_dependencies
15884
# Default React Native dependencies for 0.71 and above (new and legacy architecture)
15985
install_modules_dependencies(s)
@@ -162,13 +88,10 @@ Pod::Spec.new do |s|
16288

16389
if is_new_arch_enabled then
16490
# New Architecture on React Native 0.70 and older
165-
pod_target_xcconfig.merge!({
91+
s.pod_target_xcconfig.merge!({
16692
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
16793
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
16894
})
169-
# `install_modules_dependencies` is not defined on RN < 0.71 so re-assigning
170-
# here is safe — nothing else has written to `s.pod_target_xcconfig` yet.
171-
s.pod_target_xcconfig = pod_target_xcconfig
17295

17396
s.dependency "React-RCTFabric" # Required for Fabric Components (like RCTViewComponentView)
17497
s.dependency "React-Codegen"

packages/core/android/src/main/java/io/sentry/react/RNSentryVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class RNSentryVersion {
44
static final String REACT_NATIVE_SDK_PACKAGE_NAME = "npm:@sentry/react-native";
5-
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "8.18.0-alpha.3";
5+
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "8.17.2";
66
static final String NATIVE_SDK_NAME = "sentry.native.android.react-native";
77
static final String ANDROID_SDK_NAME = "sentry.java.android.react-native";
88
static final String REACT_NATIVE_SDK_NAME = "sentry.javascript.react-native";

packages/core/ios/RNSentrySwiftLinkStub.swift

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)