Skip to content

Commit 63f29e8

Browse files
denraseitaybreantonis
authored
Move sentry-cocoa enableLogs out of experimental (#5267)
* fix: Fixes SentryScreenFrames use after being converted to Swift * Fix build * Use non-experimental enableLogs * bump target * remove enable tracing * Update enableLogs tests --------- Co-authored-by: Itay Brenner <[email protected]> Co-authored-by: Itay Brenner <[email protected]> Co-authored-by: Antonis Lilis <[email protected]>
1 parent 4806cf2 commit 63f29e8

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

packages/core/RNSentryCocoaTester/RNSentryCocoaTester.xcodeproj/project.pbxproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,14 @@
238238
inputFileListPaths = (
239239
"${PODS_ROOT}/Target Support Files/Pods-RNSentryCocoaTesterTests/Pods-RNSentryCocoaTesterTests-resources-${CONFIGURATION}-input-files.xcfilelist",
240240
);
241+
inputPaths = (
242+
);
241243
name = "[CP] Copy Pods Resources";
242244
outputFileListPaths = (
243245
"${PODS_ROOT}/Target Support Files/Pods-RNSentryCocoaTesterTests/Pods-RNSentryCocoaTesterTests-resources-${CONFIGURATION}-output-files.xcfilelist",
244246
);
247+
outputPaths = (
248+
);
245249
runOnlyForDeploymentPostprocessing = 0;
246250
shellPath = /bin/sh;
247251
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNSentryCocoaTesterTests/Pods-RNSentryCocoaTesterTests-resources.sh\"\n";
@@ -436,7 +440,7 @@
436440
"\"$(PODS_TARGET_SRCROOT)/include/\"",
437441
"\"${PODS_ROOT}/Sentry/Sources/Sentry/include\"",
438442
);
439-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
443+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
440444
MARKETING_VERSION = 1.0;
441445
PRODUCT_BUNDLE_IDENTIFIER = io.sentry.RNSentryCocoaTesterTests;
442446
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -503,7 +507,7 @@
503507
"\"$(PODS_TARGET_SRCROOT)/include/\"",
504508
"\"${PODS_ROOT}/Sentry/Sources/Sentry/include\"",
505509
);
506-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
510+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
507511
MARKETING_VERSION = 1.0;
508512
PRODUCT_BUNDLE_IDENTIFIER = io.sentry.RNSentryCocoaTesterTests;
509513
PRODUCT_NAME = "$(TARGET_NAME)";

packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.m

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ - (void)testCreateOptionsWithDictionaryRemovesPerformanceProperties
4040
XCTAssertEqual(
4141
actualOptions.tracesSampleRate, nil, @"Traces sample rate should not be passed to native");
4242
XCTAssertEqual(actualOptions.tracesSampler, nil, @"Traces sampler should not be passed to native");
43-
XCTAssertEqual(actualOptions.enableTracing, false, @"EnableTracing should not be passed to native");
4443
}
4544

4645
- (void)testCaptureFailedRequestsIsDisabled
@@ -348,10 +347,7 @@ - (void)testCreateOptionsWithDictionaryEnableLogsEnabled
348347
XCTAssertNotNil(actualOptions, @"Did not create sentry options");
349348
XCTAssertNil(error, @"Should not pass no error");
350349

351-
id experimentalOptions = [actualOptions valueForKey:@"experimental"];
352-
XCTAssertNotNil(experimentalOptions, @"Experimental options should not be nil");
353-
354-
BOOL enableLogs = [[experimentalOptions valueForKey:@"enableLogs"] boolValue];
350+
BOOL enableLogs = [[actualOptions valueForKey:@"enableLogs"] boolValue];
355351
XCTAssertTrue(enableLogs, @"enableLogs should be enabled");
356352
}
357353

@@ -370,11 +366,8 @@ - (void)testCreateOptionsWithDictionaryEnableLogsDisabled
370366

371367
XCTAssertNotNil(actualOptions, @"Did not create sentry options");
372368
XCTAssertNil(error, @"Should not pass no error");
373-
374-
id experimentalOptions = [actualOptions valueForKey:@"experimental"];
375-
XCTAssertNotNil(experimentalOptions, @"Experimental options should not be nil");
376-
377-
BOOL enableLogs = [[experimentalOptions valueForKey:@"enableLogs"] boolValue];
369+
370+
BOOL enableLogs = [[actualOptions valueForKey:@"enableLogs"] boolValue];
378371
XCTAssertFalse(enableLogs, @"enableLogs should be disabled");
379372
}
380373

packages/core/ios/RNSentryExperimentalOptions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ + (void)setEnableLogs:(BOOL)enabled sentryOptions:(SentryOptions *)sentryOptions
2424
if (sentryOptions == nil) {
2525
return;
2626
}
27-
sentryOptions.experimental.enableLogs = enabled;
27+
sentryOptions.enableLogs = enabled;
2828
}
2929

3030
+ (void)setEnableSessionReplayInUnreliableEnvironment:(BOOL)enabled

0 commit comments

Comments
 (0)