feat(ios): Consume sentry-cocoa as a prebuilt xcframework by default#6413
Draft
alwx wants to merge 1 commit into
Draft
feat(ios): Consume sentry-cocoa as a prebuilt xcframework by default#6413alwx wants to merge 1 commit into
alwx wants to merge 1 commit into
Conversation
pod install now downloads Sentry.xcframework.zip from sentry-cocoa's GitHub release (SHA256-verified) and caches it under ~/Library/Caches/sentry-react-native/xcframeworks/<version>/, instead of building Sentry from source as a CocoaPod. Sentry symbols are then statically linked into the app binary (no framework embed, no dylib dep) via `FRAMEWORK_SEARCH_PATHS[sdk=…*]` + clang's -fmodules-autolink. Motivation: - CocoaPods trunk is winding down; we needed a path off it that also sidesteps the Xcode 16/26 archive bug that hits any signed SPM binary xcframework (`Signatures/*.signature` collision). - Consuming via CocoaPods' `vendored_frameworks` pipeline goes through a different code path and is unaffected. Fallback: set `SENTRY_USE_XCFRAMEWORK=0` before pod install to restore the source-built `Sentry` CocoaPod (for offline builds behind a restrictive proxy, or projects with another pod that transitively depends on the Sentry CocoaPod). Cache location is user-writable (not inside node_modules), which means pnpm's isolated store and Yarn PnP work without changes. Override the cache root with `SENTRY_XCFRAMEWORK_CACHE_DIR`. Verified end-to-end against alpha.3 on: - Real device signed archive (Apple accepts, codesign strict-verify passes) - Native crash → dSYM upload → Sentry frames symbolicated - RN 0.71 archive (via SKIP_BUNDLING) with 21k Sentry symbols in dSYM - EAS Build with npm, pnpm-isolated, and `SENTRY_USE_XCFRAMEWORK=0` - Second EAS build after version bump (no stale-cache pollution) Reapplies the content of PR #6381 (merged prematurely as part of the alpha.3 release, then rolled back via #6412) with the pnpm cache-location fix baked in from the start this time. 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
- Consume sentry-cocoa as a prebuilt xcframework by default ([#6413](https://github.com/getsentry/sentry-react-native/pull/6413))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
Retry of #6381, which was merged into the
release/8.18.0-alpha.3cut prematurely and then rolled back via #6412. Content re-applied, this time with the pnpm-isolated cache-location fix baked in from the start and validated end-to-end via8.18.0-alpha.3on a real bare RN app + EAS Build.pod installnow downloadsSentry.xcframework.zipfrom sentry-cocoa's GitHub release (SHA256-verified) and caches it under~/Library/Caches/sentry-react-native/xcframeworks/<version>/, instead of building Sentry from source as a CocoaPod. Sentry symbols are then statically linked into the app binary (no framework embed, no dylib dep) viaFRAMEWORK_SEARCH_PATHS[sdk=…*]+ clang's-fmodules-autolink.Override with:
SENTRY_USE_XCFRAMEWORK=0— fall back to the source-builtSentryCocoaPod (for offline builds, restrictive proxies, or projects with another pod that transitively depends on theSentryCocoaPod).SENTRY_XCFRAMEWORK_CACHE_DIR— override cache root (defaults to~/Library/Caches/sentry-react-native/xcframeworks).💡 Motivation and Context
Signatures/*.signaturecollision).vendored_frameworkspipeline goes through a different code path and is unaffected by that bug.node_modules) so pnpm's isolated store and Yarn PnP work without changes.💚 How did you test it?
Full validation matrix ran against
8.18.0-alpha.3before this retry:--config.node-linker=isolated)xcodebuild archiveSENTRY_USE_XCFRAMEWORK=0fallbackcodesign --deep --strictpasses)Static linkage confirmed empirically on every artifact:
📝 Checklist
🔮 Next steps