File tree Expand file tree Collapse file tree
RNSentryCocoaTester/RNSentryCocoaTesterTests Expand file tree Collapse file tree Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -28,15 +28,6 @@ NS_ASSUME_NONNULL_BEGIN
2828 */
2929+ (void )setEnableLogs : (BOOL )enabled sentryOptions : (SentryOptions *)sentryOptions ;
3030
31- /* *
32- * Sets the enableSessionReplayInUnreliableEnvironment experimental option on SentryOptions
33- * @param sentryOptions The SentryOptions instance to configure
34- * @param enabled Whether enableSessionReplayInUnreliableEnvironment from sentry Cocoa should be
35- * enabled
36- */
37- + (void )setEnableSessionReplayInUnreliableEnvironment : (BOOL )enabled
38- sentryOptions : (SentryOptions *)sentryOptions ;
39-
4031/* *
4132 * Configures iOS UI profiling options on SentryOptions
4233 * @param profilingOptions Dictionary containing profiling configuration
Original file line number Diff line number Diff line change @@ -28,15 +28,6 @@ + (void)setEnableLogs:(BOOL)enabled sentryOptions:(SentryOptions *)sentryOptions
2828 sentryOptions.enableLogs = enabled;
2929}
3030
31- + (void )setEnableSessionReplayInUnreliableEnvironment : (BOOL )enabled
32- sentryOptions : (SentryOptions *)sentryOptions
33- {
34- if (sentryOptions == nil ) {
35- return ;
36- }
37- sentryOptions.experimental .enableSessionReplayInUnreliableEnvironment = enabled;
38- }
39-
4031+ (void )configureProfilingWithOptions : (NSDictionary *)profilingOptions
4132 sentryOptions : (SentryOptions *)sentryOptions
4233{
Original file line number Diff line number Diff line change 33
44/* *
55 * Updates the session replay options
6- * @return true when session replay is enabled
76 */
8- + (BOOL )updateOptions : (NSMutableDictionary *)options ;
7+ + (void )updateOptions : (NSMutableDictionary *)options ;
98
109+ (void )postInit ;
1110
Original file line number Diff line number Diff line change 1212@implementation RNSentryReplay {
1313}
1414
15- + (BOOL )updateOptions : (NSMutableDictionary *)options
15+ + (void )updateOptions : (NSMutableDictionary *)options
1616{
1717 NSNumber *sessionSampleRate = options[@" replaysSessionSampleRate" ];
1818 NSNumber *errorSampleRate = options[@" replaysOnErrorSampleRate" ];
1919
2020 if (sessionSampleRate == nil && errorSampleRate == nil ) {
2121 NSLog (@" Session replay disabled via configuration" );
22- return NO ;
22+ return ;
2323 }
2424
2525 NSLog (@" Setting up session replay" );
@@ -45,8 +45,6 @@ + (BOOL)updateOptions:(NSMutableDictionary *)options
4545 @ { @" name" : REACT_NATIVE_SDK_NAME, @" version" : REACT_NATIVE_SDK_PACKAGE_VERSION }
4646 }
4747 forKey: @" sessionReplay" ];
48- return (errorSampleRate != nil && [errorSampleRate doubleValue ] > 0 )
49- || (sessionSampleRate != nil && [sessionSampleRate doubleValue ] > 0 );
5048}
5149
5250+ (NSArray *_Nonnull)getReplayRNRedactClasses : (NSDictionary *_Nullable)replayOptions
Original file line number Diff line number Diff line change @@ -44,9 +44,7 @@ + (SentryOptions *_Nullable)createOptionsWithDictionary:(NSDictionary *_Nonnull)
4444 NSMutableDictionary *mutableOptions = [options mutableCopy ];
4545
4646#if SENTRY_TARGET_REPLAY_SUPPORTED
47- BOOL isSessionReplayEnabled = [RNSentryReplay updateOptions: mutableOptions];
48- #else
49- BOOL isSessionReplayEnabled = NO ;
47+ [RNSentryReplay updateOptions: mutableOptions];
5048#endif
5149
5250 SentryOptions *sentryOptions = [PrivateSentrySDKOnly optionsWithDictionary: mutableOptions
@@ -170,11 +168,6 @@ + (SentryOptions *_Nullable)createOptionsWithDictionary:(NSDictionary *_Nonnull)
170168 }
171169 }
172170
173- if (isSessionReplayEnabled) {
174- [RNSentryExperimentalOptions setEnableSessionReplayInUnreliableEnvironment: YES
175- sentryOptions: sentryOptions];
176- }
177-
178171 return sentryOptions;
179172}
180173
Original file line number Diff line number Diff line change 1616+ (void )startWithOptions : (SentryOptions *)options ;
1717
1818+ (SentryOptions *)createOptionsWithDictionary : (NSDictionary *)options
19- isSessionReplayEnabled : (BOOL )isSessionReplayEnabled
2019 error : (NSError **)errorPointer ;
2120
22- + (void )setupWithDictionary : (NSDictionary *)options
23- isSessionReplayEnabled : (BOOL )isSessionReplayEnabled
24- error : (NSError **)errorPointer ;
21+ + (void )setupWithDictionary : (NSDictionary *)options error : (NSError **)errorPointer ;
2522
2623+ (BOOL )debug ;
2724
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ + (void)configureScope:(void (^)(SentryScope *scope))callback
3131}
3232
3333+ (SentryOptions *)createOptionsWithDictionary : (NSDictionary *)options
34- isSessionReplayEnabled : (BOOL )isSessionReplayEnabled
3534 error : (NSError *__autoreleasing *)errorPointer
3635{
3736 NSString *dsn = [self getURLFromDSN: [options valueForKey: @" dsn" ]];
@@ -115,10 +114,6 @@ + (SentryOptions *)createOptionsWithDictionary:(NSDictionary *)options
115114 }
116115 }
117116
118- if (isSessionReplayEnabled) {
119- [RNSentryExperimentalOptions setEnableSessionReplayInUnreliableEnvironment: YES
120- sentryOptions: sentryOptions];
121- }
122117 return sentryOptions;
123118}
124119
@@ -132,12 +127,9 @@ + (NSString *_Nullable)getURLFromDSN:(NSString *)dsn
132127}
133128
134129+ (void )setupWithDictionary : (NSDictionary *_Nonnull)options
135- isSessionReplayEnabled : (BOOL )isSessionReplayEnabled
136130 error : (NSError *_Nonnull *_Nonnull)errorPointer
137131{
138- SentryOptions *sentryOptions = [self createOptionsWithDictionary: options
139- isSessionReplayEnabled: isSessionReplayEnabled
140- error: errorPointer];
132+ SentryOptions *sentryOptions = [self createOptionsWithDictionary: options error: errorPointer];
141133 if (!options) {
142134 return ;
143135 }
You can’t perform that action at this time.
0 commit comments