feat(ios): Default to consuming sentry-cocoa via SPM#6381
Draft
alwx wants to merge 1 commit into
Draft
Conversation
On React Native >= 0.75, RNSentry now pulls Sentry as a pre-built binary xcframework through the SPM helper exposed by `react_native_pods.rb`, instead of building Sentry from source as a CocoaPod. On older RN versions the SPM helper is unavailable and RNSentry transparently falls back to the CocoaPods source build. Override the choice with `SENTRY_USE_SPM=0` (force CocoaPods) or `SENTRY_USE_SPM=1` (require SPM; errors if the helper is unavailable). Sample-application CI gets one extra `sentry-consumption: cocoapods` job on the production iOS build to keep the fallback path covered. Clang-format script gets a `DerivedData/**` exclusion so the SPM-fetched xcframework headers don't appear in the lint scope. Refs: #5780 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- Default to consuming sentry-cocoa via SPM ([#6381](https://github.com/getsentry/sentry-react-native/pull/6381))If none of the above apply, you can opt out of this check by adding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
Flip the default consumption path for
sentry-cocoafrom CocoaPods source build to Swift Package Manager binary xcframework, on React Native >= 0.75. On older RN where the SPM helper isn't available, transparently fall back to the existing CocoaPods source build — no breaking change for the supported RN range.Override env var still respected:
SENTRY_USE_SPM=0— force CocoaPods.SENTRY_USE_SPM=1— force SPM (errors if helper missing).💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps