Skip to content

refactor(ios): Migrate from PrivateSentrySDKOnly to SentrySDK.internal#6380

Open
alwx wants to merge 13 commits into
mainfrom
alwx/refactor/migrate-private-sentry-sdk-only
Open

refactor(ios): Migrate from PrivateSentrySDKOnly to SentrySDK.internal#6380
alwx wants to merge 13 commits into
mainfrom
alwx/refactor/migrate-private-sentry-sdk-only

docs: Move iOS use_modular_headers note to Changes; reorder Unreleased

23f1729
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-review completed Jul 7, 2026 in 0s

2 issues

code-review: Found 2 issues (2 low)

Low

setCurrentScreen silently no-ops on visionOS, dropping current-screen breadcrumb enrichment - `packages/core/ios/RNSentryInternal.swift:110-125`

The #if os(iOS) || os(tvOS) guard in RNSentryInternal.swift makes setCurrentScreen an empty stub on visionOS, but RNSentry.mm calls [RNSentryInternal setCurrentScreen:screen] under #if SENTRY_HAS_UIKIT — which also resolves true on visionOS. As a result, breadcrumb current-screen enrichment is silently dropped on visionOS with no caller-visible indication, whereas the previous PrivateSentrySDKOnly.setCurrentScreen worked under SENTRY_UIKIT_AVAILABLE (including visionOS). The code comment explicitly acknowledges this as an accepted tradeoff aligned with sentry-cocoa's new hybrid API, so this is a documented, intentional regression worth confirming rather than a defect.

No test coverage for profiling bridge methods (`startProfiler`, `collectProfile`, `discardProfiler`) - `packages/core/ios/RNSentryInternal.swift:214-237`

Have you considered adding smoke tests for the three new profiling bridge methods in RNSentryInternalTests.swift? The swizzle bridge has testSwizzleRNSScreenViewDidAppearNoOpWhenClassMissing, but the profiling path — which is called from production code in RNSentry.mm — has no corresponding coverage.

Also found at:

  • packages/core/ios/RNSentryInternal.swift:131-133

⏱ 5m 52s · 768.4k in / 48.3k out · $1.94