Commit 3b471f5
refactor(ios): remove dead SentrySDKWrapper init surface (#6059)
* refactor(ios): remove dead SentrySDKWrapper init surface
`SentrySDKWrapper.createOptionsWithDictionary:isSessionReplayEnabled:error:`
(and `setupWithDictionary:`, `startWithOptions:`, `enableAutoSessionTracking`,
`enableWatchdogTerminationTracking`) became dead when v8 moved init to
`RNSentryStart` (#5582 / #4442). The dead methods had a parallel test suite
that kept passing, which is exactly how the bugs in #6012 and #6014 shipped:
new code was added to `SentrySDKWrapper` because the tests there made it look
like the live surface.
Delete the dead methods, migrate the still-relevant test coverage to
`RNSentryStart`-based tests, drop duplicate tests already pinned on
`RNSentryStart`. `SentrySDKWrapper.h` is not in the podspec's
`public_header_files`, so no downstream consumers are affected. The kept
methods (`configureScope:`, `crash`, `close`, `crashedLastRun`, `debug`,
`releaseName`) continue to be used from `RNSentry.mm`.
Closes #6015.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(test): drop duplicate testStartBeforeBreadcrumbs… method
The migration in the previous commit added a `testStart…KeepsBreadcrumbWhenDevServerUrlIsNotPassed…`
method that already existed in the `RNSentryStart Tests` block. Compile failed
in CI with "Duplicate declaration of method". The earlier
`@interface RNSentryStart Tests` already covers this scenario; the migrated
copy is redundant.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(test): use designated initializers for SentryException and SentryMessage
Warden flagged the migrated tests using `[SentryException alloc]` and
`[SentryMessage alloc]` without `init`. Both classes have `SENTRY_NO_INIT`
and require designated initializers (`initWithValue:type:` and
`initWithFormatted:`), so the alloc-only pattern is undefined behavior —
property assignments happened to work via zero-initialized memory but
the test could crash or behave inconsistently and mask real regressions.
The pattern was inherited from the original SentrySDKWrapper-based tests
this PR migrated; same fix applied across all 12 occurrences.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 72b00e9 commit 3b471f5
3 files changed
Lines changed: 277 additions & 810 deletions
File tree
- packages/core
- RNSentryCocoaTester/RNSentryCocoaTesterTests
- ios
0 commit comments