Skip to content

Commit 1bda802

Browse files
committed
chore: Remove use of deprecate integrations API (#5304)
1 parent 6a25cb9 commit 1bda802

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ - (void)testCreateOptionsWithDictionaryNativeCrashHandlingDisabled
132132
error:&error];
133133
XCTAssertNotNil(actualOptions, @"Did not create sentry options");
134134
XCTAssertNil(error, @"Should not pass no error");
135-
XCTAssertEqual([actualOptions.integrations containsObject:@"SentryCrashIntegration"], false,
136-
@"Did not disable native crash handling");
135+
XCTAssertFalse(actualOptions.enableCrashHandler, @"Did not disable native crash handling");
137136
}
138137

139138
- (void)testCreateOptionsWithDictionaryAutoPerformanceTracingDisabled

packages/core/ios/RNSentry.mm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,7 @@ - (SentryOptions *_Nullable)createOptionsWithDictionary:(NSDictionary *_Nonnull)
261261
BOOL enableNativeCrashHandling = [mutableOptions[@"enableNativeCrashHandling"] boolValue];
262262

263263
if (!enableNativeCrashHandling) {
264-
NSMutableArray *integrations = sentryOptions.integrations.mutableCopy;
265-
[integrations removeObject:@"SentryCrashIntegration"];
266-
sentryOptions.integrations = integrations;
264+
sentryOptions.enableCrashHandler = NO;
267265
}
268266
}
269267

0 commit comments

Comments
 (0)