Skip to content

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

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

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.

💚 How did you test it?

📝 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

@github-actions

github-actions Bot commented Jul 17, 2026

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
  • chore(deps): bump actions/setup-java from 5.5.0 to 5.6.0 by dependabot in #6476

🤖 This preview updates automatically when you update the PR.

…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.
@alwx
alwx force-pushed the fix/ios-xcframework-rnsscreen-swizzle-link branch from 74b4aae to e4a99a6 Compare July 20, 2026 08:38
@alwx alwx self-assigned this Jul 20, 2026
@alwx
alwx marked this pull request as ready for review July 20, 2026 08:42
@getsentry getsentry deleted a comment from github-actions Bot Jul 20, 2026
@alwx alwx added the ready-to-merge Triggers the full CI test suite label Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor
Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Fixes

- Restore ObjC SentrySwizzle for RNSScreen to link against xcframework ([#6468](https://github.com/getsentry/sentry-react-native/pull/6468))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against e4a99a6

@sentry

sentry Bot commented Jul 20, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.19.0 (99) Release

⚙️ sentry-react-native Build Distribution Settings

@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Should we close this PR? it seems the root cause was done by user error.

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

Labels

ready-to-merge Triggers the full CI test suite

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

2 participants