diff --git a/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.m b/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.m index a15639423b..48b3eb0b0c 100644 --- a/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.m +++ b/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.m @@ -34,7 +34,6 @@ - (void)testCreateOptionsWithDictionaryRemovesPerformanceProperties mockedReactNativeDictionary = [rnSentry prepareOptions:mockedReactNativeDictionary]; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); @@ -57,7 +56,6 @@ - (void)testCaptureFailedRequestsIsDisabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); @@ -74,7 +72,6 @@ - (void)testCreateOptionsWithDictionaryNativeCrashHandlingDefault }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -90,7 +87,6 @@ - (void)testCreateOptionsWithDictionaryAutoPerformanceTracingDefault }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -108,7 +104,6 @@ - (void)testCreateOptionsWithDictionaryNativeCrashHandlingEnabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -125,7 +120,6 @@ - (void)testCreateOptionsWithDictionaryAutoPerformanceTracingEnabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -143,7 +137,6 @@ - (void)testCreateOptionsWithDictionaryNativeCrashHandlingDisabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -160,7 +153,6 @@ - (void)testCreateOptionsWithDictionaryAutoPerformanceTracingDisabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -179,7 +171,6 @@ - (void)testCreateOptionsWithDictionarySpotlightEnabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -198,7 +189,6 @@ - (void)testCreateOptionsWithDictionarySpotlightOne }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -216,7 +206,6 @@ - (void)testCreateOptionsWithDictionarySpotlightUrl }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -234,7 +223,6 @@ - (void)testCreateOptionsWithDictionarySpotlightDisabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -251,7 +239,6 @@ - (void)testCreateOptionsWithDictionarySpotlightZero }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); XCTAssertNil(error, @"Should not pass no error"); @@ -270,7 +257,6 @@ - (void)testCreateOptionsWithDictionaryEnableUnhandledCPPExceptionsV2Enabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); @@ -297,7 +283,6 @@ - (void)testCreateOptionsWithDictionaryEnableUnhandledCPPExceptionsV2Disabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); @@ -321,7 +306,6 @@ - (void)testCreateOptionsWithDictionaryEnableUnhandledCPPExceptionsV2Default }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); @@ -347,7 +331,6 @@ - (void)testCreateOptionsWithDictionaryEnableLogsEnabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); @@ -367,7 +350,6 @@ - (void)testCreateOptionsWithDictionaryEnableLogsDisabled }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(actualOptions, @"Did not create sentry options"); @@ -385,7 +367,6 @@ - (void)testPassesErrorOnWrongDsn }; SentryOptions *actualOptions = [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO error:&error]; XCTAssertNil(actualOptions, @"Created invalid sentry options"); @@ -403,7 +384,6 @@ - (void)testBeforeBreadcrumbsCallbackFiltersOutSentryDsnRequestBreadcrumbs }; mockedDictionary = [rnSentry prepareOptions:mockedDictionary]; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedDictionary - isSessionReplayEnabled:NO error:&error]; SentryBreadcrumb *breadcrumb = [[SentryBreadcrumb alloc] init]; breadcrumb.type = @"http"; @@ -423,7 +403,6 @@ - (void)testBeforeBreadcrumbsCallbackFiltersOutDevServerRequestBreadcrumbs NSDictionary *_Nonnull mockedDictionary = @{ @"dsn" : @"https://abc@def.ingest.sentry.io/1234567", @"devServerUrl" : mockDevServer }; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedDictionary - isSessionReplayEnabled:NO error:&error]; SentryBreadcrumb *breadcrumb = [[SentryBreadcrumb alloc] init]; breadcrumb.type = @"http"; @@ -443,7 +422,6 @@ - (void)testBeforeBreadcrumbsCallbackDoesNotFiltersOutNonDevServerOrDsnRequestBr @"devServerUrl" : @"http://localhost:8081" }; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedDictionary - isSessionReplayEnabled:NO error:&error]; SentryBreadcrumb *breadcrumb = [[SentryBreadcrumb alloc] init]; breadcrumb.type = @"http"; @@ -462,7 +440,6 @@ - (void)testBeforeBreadcrumbsCallbackKeepsBreadcrumbWhenDevServerUrlIsNotPassedA @"dsn" : @"https://abc@def.ingest.sentry.io/1234567" }; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedDictionary - isSessionReplayEnabled:NO error:&error]; SentryBreadcrumb *breadcrumb = [[SentryBreadcrumb alloc] init]; breadcrumb.type = @"http"; @@ -650,7 +627,6 @@ - (void)testIgnoreErrorsDropsMatchingExceptionValue } mutableCopy]; mockedOptions = [rnSentry prepareOptions:mockedOptions]; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedOptions - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(options); XCTAssertNil(error); @@ -672,7 +648,6 @@ - (void)testIgnoreErrorsDropsMatchingEventMessage } mutableCopy]; mockedOptions = [rnSentry prepareOptions:mockedOptions]; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedOptions - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(options); XCTAssertNotNil(options); @@ -695,7 +670,6 @@ - (void)testIgnoreErrorsDoesNotDropNonMatchingEvent } mutableCopy]; mockedOptions = [rnSentry prepareOptions:mockedOptions]; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedOptions - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(options); XCTAssertNotNil(options); @@ -721,7 +695,6 @@ - (void)testIgnoreErrorsDropsMatchingExactString } mutableCopy]; mockedOptions = [rnSentry prepareOptions:mockedOptions]; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedOptions - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(options); XCTAssertNotNil(options); @@ -746,7 +719,6 @@ - (void)testIgnoreErrorsRegexAndStringBothWork } mutableCopy]; mockedOptions = [rnSentry prepareOptions:mockedOptions]; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedOptions - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(options); XCTAssertNotNil(options); @@ -783,7 +755,6 @@ - (void)testBeforeSendFiltersOutUnhandledJSException } mutableCopy]; mockedOptions = [rnSentry prepareOptions:mockedOptions]; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedOptions - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(options); XCTAssertNil(error); @@ -806,7 +777,6 @@ - (void)testBeforeSendFiltersOutJSErrorCppException } mutableCopy]; mockedOptions = [rnSentry prepareOptions:mockedOptions]; SentryOptions *options = [SentrySDKWrapper createOptionsWithDictionary:mockedOptions - isSessionReplayEnabled:NO error:&error]; XCTAssertNotNil(options); XCTAssertNil(error); @@ -848,138 +818,6 @@ - (void)testBeforeSendFiltersOutJSErrorCppException @"dropped"); } -- (void)testCreateOptionsWithDictionaryEnableSessionReplayInUnreliableEnvironmentDefault -{ - NSError *error = nil; - - NSDictionary *_Nonnull mockedReactNativeDictionary = @{ - @"dsn" : @"https://abcd@efgh.ingest.sentry.io/123456", - }; - SentryOptions *actualOptions = - [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO - error:&error]; - - XCTAssertNotNil(actualOptions, @"Did not create sentry options"); - XCTAssertNil(error, @"Should not pass no error"); - - id experimentalOptions = [actualOptions valueForKey:@"experimental"]; - XCTAssertNotNil(experimentalOptions, @"Experimental options should not be nil"); - - BOOL enableUnhandledCPPExceptions = - [[experimentalOptions valueForKey:@"enableSessionReplayInUnreliableEnvironment"] boolValue]; - XCTAssertFalse(enableUnhandledCPPExceptions, - @"enableSessionReplayInUnreliableEnvironment should be disabled"); -} - -- (void)testCreateOptionsWithDictionaryEnableSessionReplayInUnreliableEnvironmentWithErrorSampleRate -{ - NSError *error = nil; - - NSMutableDictionary *_Nonnull mockedReactNativeDictionary = [@{ - @"dsn" : @"https://abcd@efgh.ingest.sentry.io/123456", - @"replaysOnErrorSampleRate" : @1.0, - @"replaysSessionSampleRate" : @0 - } mutableCopy]; - BOOL enableReplay = [RNSentryReplay updateOptions:mockedReactNativeDictionary]; - SentryOptions *actualOptions = - [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:enableReplay - error:&error]; - - XCTAssertNotNil(actualOptions, @"Did not create sentry options"); - XCTAssertNil(error, @"Should not pass no error"); - - id experimentalOptions = [actualOptions valueForKey:@"experimental"]; - XCTAssertNotNil(experimentalOptions, @"Experimental options should not be nil"); - - BOOL enableUnhandledCPPExceptions = - [[experimentalOptions valueForKey:@"enableSessionReplayInUnreliableEnvironment"] boolValue]; - XCTAssertTrue(enableUnhandledCPPExceptions, - @"enableSessionReplayInUnreliableEnvironment should be enabled"); -} - -- (void) - testCreateOptionsWithDictionaryEnableSessionReplayInUnreliableEnvironmentWithSessionSampleRate -{ - NSError *error = nil; - - NSMutableDictionary *_Nonnull mockedReactNativeDictionary = [@{ - @"dsn" : @"https://abcd@efgh.ingest.sentry.io/123456", - @"replaysOnErrorSampleRate" : @0.0, - @"replaysSessionSampleRate" : @0.1 - } mutableCopy]; - BOOL enableReplay = [RNSentryReplay updateOptions:mockedReactNativeDictionary]; - SentryOptions *actualOptions = - [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:enableReplay - error:&error]; - XCTAssertNotNil(actualOptions, @"Did not create sentry options"); - XCTAssertNil(error, @"Should not pass no error"); - - id experimentalOptions = [actualOptions valueForKey:@"experimental"]; - XCTAssertNotNil(experimentalOptions, @"Experimental options should not be nil"); - - BOOL enableUnhandledCPPExceptions = - [[experimentalOptions valueForKey:@"enableSessionReplayInUnreliableEnvironment"] boolValue]; - XCTAssertTrue(enableUnhandledCPPExceptions, - @"enableSessionReplayInUnreliableEnvironment should be enabled"); -} - -- (void) - testCreateOptionsWithDictionaryEnableSessionReplayInUnreliableEnvironmentWithSessionSampleRates -{ - NSError *error = nil; - - NSMutableDictionary *_Nonnull mockedReactNativeDictionary = [@{ - @"dsn" : @"https://abcd@efgh.ingest.sentry.io/123456", - @"replaysOnErrorSampleRate" : @1.0, - @"replaysSessionSampleRate" : @0.1 - } mutableCopy]; - BOOL enableReplay = [RNSentryReplay updateOptions:mockedReactNativeDictionary]; - SentryOptions *actualOptions = - [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:enableReplay - error:&error]; - - XCTAssertNotNil(actualOptions, @"Did not create sentry options"); - XCTAssertNil(error, @"Should not pass no error"); - - id experimentalOptions = [actualOptions valueForKey:@"experimental"]; - XCTAssertNotNil(experimentalOptions, @"Experimental options should not be nil"); - - BOOL enableUnhandledCPPExceptions = - [[experimentalOptions valueForKey:@"enableSessionReplayInUnreliableEnvironment"] boolValue]; - XCTAssertTrue(enableUnhandledCPPExceptions, - @"enableSessionReplayInUnreliableEnvironment should be enabled"); -} - -- (void)testCreateOptionsWithDictionaryEnableSessionReplayInUnreliableEnvironmentDisabled -{ - NSError *error = nil; - - NSDictionary *_Nonnull mockedReactNativeDictionary = @{ - @"dsn" : @"https://abcd@efgh.ingest.sentry.io/123456", - @"replaysOnErrorSampleRate" : @0, - @"replaysSessionSampleRate" : @0 - }; - SentryOptions *actualOptions = - [SentrySDKWrapper createOptionsWithDictionary:mockedReactNativeDictionary - isSessionReplayEnabled:NO - error:&error]; - - XCTAssertNotNil(actualOptions, @"Did not create sentry options"); - XCTAssertNil(error, @"Should not pass no error"); - - id experimentalOptions = [actualOptions valueForKey:@"experimental"]; - XCTAssertNotNil(experimentalOptions, @"Experimental options should not be nil"); - - BOOL enableUnhandledCPPExceptions = - [[experimentalOptions valueForKey:@"enableSessionReplayInUnreliableEnvironment"] boolValue]; - XCTAssertFalse(enableUnhandledCPPExceptions, - @"enableSessionReplayInUnreliableEnvironment should be disabled"); -} - - (void)testCreateUserWithGeoDataCreatesSentryGeoObject { NSDictionary *userKeys = @{ diff --git a/packages/core/ios/RNSentryExperimentalOptions.h b/packages/core/ios/RNSentryExperimentalOptions.h index eece5af374..07f5395665 100644 --- a/packages/core/ios/RNSentryExperimentalOptions.h +++ b/packages/core/ios/RNSentryExperimentalOptions.h @@ -28,15 +28,6 @@ NS_ASSUME_NONNULL_BEGIN */ + (void)setEnableLogs:(BOOL)enabled sentryOptions:(SentryOptions *)sentryOptions; -/** - * Sets the enableSessionReplayInUnreliableEnvironment experimental option on SentryOptions - * @param sentryOptions The SentryOptions instance to configure - * @param enabled Whether enableSessionReplayInUnreliableEnvironment from sentry Cocoa should be - * enabled - */ -+ (void)setEnableSessionReplayInUnreliableEnvironment:(BOOL)enabled - sentryOptions:(SentryOptions *)sentryOptions; - /** * Configures iOS UI profiling options on SentryOptions * @param profilingOptions Dictionary containing profiling configuration diff --git a/packages/core/ios/RNSentryExperimentalOptions.m b/packages/core/ios/RNSentryExperimentalOptions.m index d2f636ca92..c53576254d 100644 --- a/packages/core/ios/RNSentryExperimentalOptions.m +++ b/packages/core/ios/RNSentryExperimentalOptions.m @@ -28,15 +28,6 @@ + (void)setEnableLogs:(BOOL)enabled sentryOptions:(SentryOptions *)sentryOptions sentryOptions.enableLogs = enabled; } -+ (void)setEnableSessionReplayInUnreliableEnvironment:(BOOL)enabled - sentryOptions:(SentryOptions *)sentryOptions -{ - if (sentryOptions == nil) { - return; - } - sentryOptions.experimental.enableSessionReplayInUnreliableEnvironment = enabled; -} - + (void)configureProfilingWithOptions:(NSDictionary *)profilingOptions sentryOptions:(SentryOptions *)sentryOptions { diff --git a/packages/core/ios/RNSentryReplay.h b/packages/core/ios/RNSentryReplay.h index cda7035550..49d61d4b1a 100644 --- a/packages/core/ios/RNSentryReplay.h +++ b/packages/core/ios/RNSentryReplay.h @@ -3,9 +3,8 @@ /** * Updates the session replay options - * @return true when session replay is enabled */ -+ (BOOL)updateOptions:(NSMutableDictionary *)options; ++ (void)updateOptions:(NSMutableDictionary *)options; + (void)postInit; diff --git a/packages/core/ios/RNSentryReplay.mm b/packages/core/ios/RNSentryReplay.mm index 47bac6cdf5..c7adf33ebe 100644 --- a/packages/core/ios/RNSentryReplay.mm +++ b/packages/core/ios/RNSentryReplay.mm @@ -12,14 +12,14 @@ @implementation RNSentryReplay { } -+ (BOOL)updateOptions:(NSMutableDictionary *)options ++ (void)updateOptions:(NSMutableDictionary *)options { NSNumber *sessionSampleRate = options[@"replaysSessionSampleRate"]; NSNumber *errorSampleRate = options[@"replaysOnErrorSampleRate"]; if (sessionSampleRate == nil && errorSampleRate == nil) { NSLog(@"Session replay disabled via configuration"); - return NO; + return; } NSLog(@"Setting up session replay"); @@ -45,8 +45,6 @@ + (BOOL)updateOptions:(NSMutableDictionary *)options @ { @"name" : REACT_NATIVE_SDK_NAME, @"version" : REACT_NATIVE_SDK_PACKAGE_VERSION } } forKey:@"sessionReplay"]; - return (errorSampleRate != nil && [errorSampleRate doubleValue] > 0) - || (sessionSampleRate != nil && [sessionSampleRate doubleValue] > 0); } + (NSArray *_Nonnull)getReplayRNRedactClasses:(NSDictionary *_Nullable)replayOptions diff --git a/packages/core/ios/RNSentryStart.m b/packages/core/ios/RNSentryStart.m index 2542da23b6..6763d2e072 100644 --- a/packages/core/ios/RNSentryStart.m +++ b/packages/core/ios/RNSentryStart.m @@ -44,9 +44,7 @@ + (SentryOptions *_Nullable)createOptionsWithDictionary:(NSDictionary *_Nonnull) NSMutableDictionary *mutableOptions = [options mutableCopy]; #if SENTRY_TARGET_REPLAY_SUPPORTED - BOOL isSessionReplayEnabled = [RNSentryReplay updateOptions:mutableOptions]; -#else - BOOL isSessionReplayEnabled = NO; + [RNSentryReplay updateOptions:mutableOptions]; #endif SentryOptions *sentryOptions = [PrivateSentrySDKOnly optionsWithDictionary:mutableOptions @@ -170,11 +168,6 @@ + (SentryOptions *_Nullable)createOptionsWithDictionary:(NSDictionary *_Nonnull) } } - if (isSessionReplayEnabled) { - [RNSentryExperimentalOptions setEnableSessionReplayInUnreliableEnvironment:YES - sentryOptions:sentryOptions]; - } - return sentryOptions; } diff --git a/packages/core/ios/SentrySDKWrapper.h b/packages/core/ios/SentrySDKWrapper.h index ce6463d77f..483b0bcdac 100644 --- a/packages/core/ios/SentrySDKWrapper.h +++ b/packages/core/ios/SentrySDKWrapper.h @@ -16,11 +16,9 @@ + (void)startWithOptions:(SentryOptions *)options; + (SentryOptions *)createOptionsWithDictionary:(NSDictionary *)options - isSessionReplayEnabled:(BOOL)isSessionReplayEnabled error:(NSError **)errorPointer; + (void)setupWithDictionary:(NSDictionary *)options - isSessionReplayEnabled:(BOOL)isSessionReplayEnabled error:(NSError **)errorPointer; + (BOOL)debug; diff --git a/packages/core/ios/SentrySDKWrapper.m b/packages/core/ios/SentrySDKWrapper.m index 38647527a0..a0d8282aca 100644 --- a/packages/core/ios/SentrySDKWrapper.m +++ b/packages/core/ios/SentrySDKWrapper.m @@ -31,7 +31,6 @@ + (void)configureScope:(void (^)(SentryScope *scope))callback } + (SentryOptions *)createOptionsWithDictionary:(NSDictionary *)options - isSessionReplayEnabled:(BOOL)isSessionReplayEnabled error:(NSError *__autoreleasing *)errorPointer { NSString *dsn = [self getURLFromDSN:[options valueForKey:@"dsn"]]; @@ -115,10 +114,6 @@ + (SentryOptions *)createOptionsWithDictionary:(NSDictionary *)options } } - if (isSessionReplayEnabled) { - [RNSentryExperimentalOptions setEnableSessionReplayInUnreliableEnvironment:YES - sentryOptions:sentryOptions]; - } return sentryOptions; } @@ -132,11 +127,9 @@ + (NSString *_Nullable)getURLFromDSN:(NSString *)dsn } + (void)setupWithDictionary:(NSDictionary *_Nonnull)options - isSessionReplayEnabled:(BOOL)isSessionReplayEnabled error:(NSError *_Nonnull *_Nonnull)errorPointer { SentryOptions *sentryOptions = [self createOptionsWithDictionary:options - isSessionReplayEnabled:isSessionReplayEnabled error:errorPointer]; if (!options) { return;