Skip to content

fix(ios): Restore ObjC SentrySwizzle for RNSScreen to link against xcframework#6468

Draft
alwx wants to merge 1 commit into
mainfrom
fix/ios-xcframework-rnsscreen-swizzle-link
Draft

fix(ios): Restore ObjC SentrySwizzle for RNSScreen to link against xcframework#6468
alwx wants to merge 1 commit into
mainfrom
fix/ios-xcframework-rnsscreen-swizzle-link

Conversation

@alwx

@alwx alwx commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix

📜 Description

Restore the SentrySwizzle ObjC path for the RNSScreen viewDidAppear: swizzle. The Swift SentrySDK.internal.swizzle API introduced in #6380 references SentryInternalSwizzleApi.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 SentrySwizzle class + SentrySwizzleMode enum export normally (_OBJC_CLASS_$_SentrySwizzle verified in the arm64 slice), so this call site links cleanly for both the xcframework default and the source-built SENTRY_USE_XCFRAMEWORK=0 fallback. The rest of the SentrySDK.internal migration 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.xcframework arm64 slice confirms _OBJC_CLASS_$_SentrySwizzle is exported. End-to-end verification on a bare RN app with default SENTRY_USE_XCFRAMEWORK (device build) still pending — will do before removing draft.

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

🔮 Next steps

…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.
@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • fix(ios): Restore ObjC SentrySwizzle for RNSScreen to link against xcframework by alwx in #6468
  • release: 8.19.0 by alwx in b57f2519
  • chore(deps): bump ruby/setup-ruby from 1.316.0 to 1.319.0 by dependabot in #6462
  • chore(deps): update Sentry Android Gradle Plugin to v6.15.0 by github-actions in #6464
  • fix(tracing): Retry expoRouterIntegration navigationRef lookup by alwx in #6451
  • feat(core): Aggregate TurboModule call counts and latency per (module, method, kind) by alwx in #6377
  • chore(deps): bump the codeql-action group with 2 updates by dependabot in #6461
  • fix(core): Fix stale route when reactNavigationIntegration uses a route override provider by alwx in #6458
  • chore(deps): update Android SDK to v8.49.0 by github-actions in #6459
  • feat(android): Add enableHistoricalTombstoneReporting option by Cryptoteep in #6450
  • docs(sdk-versions): Add 8.14.2 row to main by alwx in #6456
  • docs(changelog): Add 8.14.2 changelog entry by alwx in #6455
  • chore(deps): bump ruby/setup-ruby from 1.314.0 to 1.316.0 by dependabot in #6446
  • chore(deps): bump actions/setup-java from 5.3.0 to 5.5.0 by dependabot in #6444
  • chore(deps): bump github/codeql-action/analyze from 4.36.3 to 4.37.0 by dependabot in #6443
  • chore(deps): bump dorny/paths-filter from 4.0.1 to 4.0.2 by dependabot in #6442
  • chore(deps): update JavaScript SDK to v10.65.0 by github-actions in #6441
  • fix(ios): Break RNSentryOnDrawReporterView retain cycle in emit-new-frame block by alwx in #6449
  • refactor(ios): Migrate from PrivateSentrySDKOnly to SentrySDK.internal by alwx in #6380
  • docs: Improve PR template guidance by sentry-junior in #6447
  • fix(ios): Resolve getNewScreenTimeToDisplay Promise with number not array by antonis in #6438
  • fix(feedback): Guard show/hide against uninitialized _setVisibility by antonis in #6435
  • fix(tracing): Fix orphaned TTID/TTFD spans in the trace view by antonis in #6437
  • feat(tracing): Add reportFullyDisplayed() static API by antonis in #6419

Plus 7 more


🤖 This preview updates automatically when you update the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS build fails to link (Undefined symbols: SentryInternalSwizzleApi.Mode.oncePerClass) when consuming the default prebuilt Sentry.xcframework

1 participant