fix(ios): Restore ObjC SentrySwizzle for RNSScreen to link against xcframework#6468
Draft
alwx wants to merge 1 commit into
Draft
fix(ios): Restore ObjC SentrySwizzle for RNSScreen to link against xcframework#6468alwx wants to merge 1 commit into
alwx wants to merge 1 commit into
Conversation
…framework The Swift SPI enum case SentryInternalSwizzleApi.Mode.oncePerClass isn't exported as a linkable symbol from sentry-cocoa's prebuilt static xcframework, so consumers on the default SENTRY_USE_XCFRAMEWORK path fail to link. Route the RNSScreen viewDidAppear: swizzle back through the ObjC SentrySwizzle API, whose class symbols are exported in the xcframework slice. Fixes #6465.
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
Plus 7 more 🤖 This preview updates automatically when you update the PR. |
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
Restore the
SentrySwizzleObjC path for theRNSScreen viewDidAppear:swizzle. The SwiftSentrySDK.internal.swizzleAPI introduced in #6380 referencesSentryInternalSwizzleApi.Mode.oncePerClass, an@_spi(Private)enum case whose metadata symbol is not exported from sentry-cocoa's prebuilt static xcframework — compile succeeds via.private.swiftinterface, but link fails on arm64.The ObjC
SentrySwizzleclass +SentrySwizzleModeenum export normally (_OBJC_CLASS_$_SentrySwizzleverified in the arm64 slice), so this call site links cleanly for both the xcframework default and the source-builtSENTRY_USE_XCFRAMEWORK=0fallback. The rest of theSentrySDK.internalmigration in #6380 keeps using the Swift bridge.💡 Motivation and Context
Fixes #6465. Regression from the interaction of #6380 (Swift SPI adoption) and #6413 (xcframework default from 8.19). Only the swizzle call was affected — none of the other SPI Swift APIs the bridge uses hit the same symbol-visibility gap.
💚 How did you test it?
Symbol check on the shipped
Sentry.xcframeworkarm64 slice confirms_OBJC_CLASS_$_SentrySwizzleis exported. End-to-end verification on a bare RN app with defaultSENTRY_USE_XCFRAMEWORK(device build) still pending — will do before removing draft.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps