From 7a6765c5bcda7142342cc9fbb8f6c29f4ad1f9a6 Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Mon, 3 Nov 2025 16:39:19 -0500 Subject: [PATCH] fix: Remove property that had no effect --- CHANGELOG.md | 1 + Sources/Sentry/Public/SentryOptions.h | 16 --- Sources/Sentry/SentryCrashIntegration.m | 3 +- Sources/Sentry/SentryDefaultThreadInspector.m | 3 +- Sources/Sentry/SentryMetricKitIntegration.m | 3 +- Sources/Sentry/SentryOptions.m | 7 -- Sources/Sentry/SentryOptionsInternal.m | 8 -- .../Sentry/SentryUIViewControllerSwizzling.m | 3 +- .../SentryUseNSExceptionCallstackWrapper.m | 3 +- .../Swift/Core/Helper/SentryInAppLogic.swift | 25 ++--- ...ryUIViewControllerPerformanceTracker.swift | 2 +- ...iewControllerPerformanceTrackerTests.swift | 2 +- ...SentryCrashInstallationReporterTests.swift | 2 +- .../SentryCrashReportSinkTests.swift | 2 +- .../SentryCrashStackEntryMapperTests.swift | 2 +- .../SentryDefaultThreadInspectorTests.swift | 4 +- .../SentryCrash/SentryInAppLogicTests.swift | 22 ++--- .../SentryStacktraceBuilderTests.swift | 2 +- .../SentryCrash/TestThreadInspector.swift | 2 +- .../SentryCrashReportConverterTests.m | 2 +- Tests/SentryTests/SentryOptionsTest.m | 25 ----- sdk_api.json | 99 ------------------- 22 files changed, 29 insertions(+), 209 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 634abac3651..30a4c11f872 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Removes `SentryIntegrationProtocol` from the API. This is not used after the removal of the `integrations` property (#6660) - Removes deprecated SentryDebugImageProvider class (#5598) - Properties on SentryOptions that had no effect on the WithoutUIKit variant are now removed from the API (#6644) +- Removes the SentryOptions.inAppExclude property because it had no effect (#6646) - Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (#5638) - Removes deprecated TraceContext initializers (#6348) - Removes deprecated user feedback API, this is replaced with the new feedback API (#5591) diff --git a/Sources/Sentry/Public/SentryOptions.h b/Sources/Sentry/Public/SentryOptions.h index 7af3b4398bf..9673babc6da 100644 --- a/Sources/Sentry/Public/SentryOptions.h +++ b/Sources/Sentry/Public/SentryOptions.h @@ -452,7 +452,6 @@ NS_SWIFT_NAME(Options) /** * A list of string prefixes of framework names that belong to the app. - * @note This option takes precedence over @c inAppExcludes. * @note By default, this contains @c CFBundleExecutable to mark it as "in-app". */ @property (nonatomic, readonly, copy) NSArray *inAppIncludes; @@ -463,21 +462,6 @@ NS_SWIFT_NAME(Options) */ - (void)addInAppInclude:(NSString *)inAppInclude; -/** - * A list of string prefixes of framework names that do not belong to the app, but rather to - * third-party frameworks. - * @note By default, frameworks considered not part of the app will be hidden from stack - * traces. - * @note This option can be overridden using @c inAppIncludes. - */ -@property (nonatomic, readonly, copy) NSArray *inAppExcludes; - -/** - * Adds an item to the list of @c inAppExcludes. - * @param inAppExclude The prefix of the frameworks name. - */ -- (void)addInAppExclude:(NSString *)inAppExclude; - /** * Set as delegate on the @c NSURLSession used for all network data-transfer tasks performed by * Sentry. diff --git a/Sources/Sentry/SentryCrashIntegration.m b/Sources/Sentry/SentryCrashIntegration.m index 04e13ee1815..57c0d1d99ce 100644 --- a/Sources/Sentry/SentryCrashIntegration.m +++ b/Sources/Sentry/SentryCrashIntegration.m @@ -145,8 +145,7 @@ - (void)startCrashHandler:(NSString *)cacheDirectory BOOL canSendReports = NO; if (installation == nil) { SentryInAppLogic *inAppLogic = - [[SentryInAppLogic alloc] initWithInAppIncludes:self.options.inAppIncludes - inAppExcludes:self.options.inAppExcludes]; + [[SentryInAppLogic alloc] initWithInAppIncludes:self.options.inAppIncludes]; installation = [[SentryCrashInstallationReporter alloc] initWithInAppLogic:inAppLogic diff --git a/Sources/Sentry/SentryDefaultThreadInspector.m b/Sources/Sentry/SentryDefaultThreadInspector.m index ff93b7adaca..d6abeb394db 100644 --- a/Sources/Sentry/SentryDefaultThreadInspector.m +++ b/Sources/Sentry/SentryDefaultThreadInspector.m @@ -69,8 +69,7 @@ - (id)initWithStacktraceBuilder:(SentryStacktraceBuilder *)stacktraceBuilder - (instancetype)initWithOptions:(SentryOptions *_Nullable)options { SentryInAppLogic *inAppLogic = - [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes ?: @[] - inAppExcludes:options.inAppExcludes ?: @[]]; + [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes ?: @[]]; SentryCrashStackEntryMapper *crashStackEntryMapper = [[SentryCrashStackEntryMapper alloc] initWithInAppLogic:inAppLogic]; SentryStacktraceBuilder *stacktraceBuilder = diff --git a/Sources/Sentry/SentryMetricKitIntegration.m b/Sources/Sentry/SentryMetricKitIntegration.m index 75ce124e1ae..fd8a1b0f9ad 100644 --- a/Sources/Sentry/SentryMetricKitIntegration.m +++ b/Sources/Sentry/SentryMetricKitIntegration.m @@ -67,8 +67,7 @@ - (BOOL)installWithOptions:(SentryOptions *)options self.measurementFormatter = [[NSMeasurementFormatter alloc] init]; self.measurementFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; self.measurementFormatter.unitOptions = NSMeasurementFormatterUnitOptionsProvidedUnit; - self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes - inAppExcludes:options.inAppExcludes]; + self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes]; self.attachDiagnosticAsAttachment = options.enableMetricKitRawPayload; return YES; diff --git a/Sources/Sentry/SentryOptions.m b/Sources/Sentry/SentryOptions.m index 391eccd3727..e4ea3ba6141 100644 --- a/Sources/Sentry/SentryOptions.m +++ b/Sources/Sentry/SentryOptions.m @@ -139,8 +139,6 @@ - (instancetype)init _inAppIncludes = @[ bundleExecutable ]; } - _inAppExcludes = [NSArray new]; - // Set default release name if (infoDict != nil) { self.releaseName = @@ -216,11 +214,6 @@ - (void)addInAppInclude:(NSString *)inAppInclude _inAppIncludes = [self.inAppIncludes arrayByAddingObject:inAppInclude]; } -- (void)addInAppExclude:(NSString *)inAppExclude -{ - _inAppExcludes = [self.inAppExcludes arrayByAddingObject:inAppExclude]; -} - - (void)setSampleRate:(NSNumber *)sampleRate { if (sampleRate == nil) { diff --git a/Sources/Sentry/SentryOptionsInternal.m b/Sources/Sentry/SentryOptionsInternal.m index 9b4efb90975..53c038da4b2 100644 --- a/Sources/Sentry/SentryOptionsInternal.m +++ b/Sources/Sentry/SentryOptionsInternal.m @@ -252,14 +252,6 @@ + (BOOL)validateOptions:(NSDictionary *)options } } - if ([options[@"inAppExcludes"] isKindOfClass:[NSArray class]]) { - NSArray *inAppExcludes = - [options[@"inAppExcludes"] filteredArrayUsingPredicate:isNSString]; - for (NSString *exclude in inAppExcludes) { - [sentryOptions addInAppExclude:exclude]; - } - } - if ([options[@"urlSession"] isKindOfClass:[NSURLSession class]]) { sentryOptions.urlSession = options[@"urlSession"]; } diff --git a/Sources/Sentry/SentryUIViewControllerSwizzling.m b/Sources/Sentry/SentryUIViewControllerSwizzling.m index 66e2f7f2979..d77e77c1653 100644 --- a/Sources/Sentry/SentryUIViewControllerSwizzling.m +++ b/Sources/Sentry/SentryUIViewControllerSwizzling.m @@ -51,8 +51,7 @@ - (instancetype)initWithOptions:(SentryOptions *)options { if (self = [super init]) { self.options = options; - self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes - inAppExcludes:options.inAppExcludes]; + self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes]; self.dispatchQueue = dispatchQueue; self.objcRuntimeWrapper = objcRuntimeWrapper; self.subClassFinder = subClassFinder; diff --git a/Sources/Sentry/SentryUseNSExceptionCallstackWrapper.m b/Sources/Sentry/SentryUseNSExceptionCallstackWrapper.m index f00c79568a3..5118e920218 100644 --- a/Sources/Sentry/SentryUseNSExceptionCallstackWrapper.m +++ b/Sources/Sentry/SentryUseNSExceptionCallstackWrapper.m @@ -61,8 +61,7 @@ - (SentryCrashStackEntryMapper *)buildCrashStackToEntryMapper SentryOptions *options = SentrySDKInternal.options; SentryInAppLogic *inAppLogic = - [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes - inAppExcludes:options.inAppExcludes]; + [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes]; SentryCrashStackEntryMapper *crashStackEntryMapper = [[SentryCrashStackEntryMapper alloc] initWithInAppLogic:inAppLogic]; diff --git a/Sources/Swift/Core/Helper/SentryInAppLogic.swift b/Sources/Swift/Core/Helper/SentryInAppLogic.swift index 462356275a2..05036c34908 100644 --- a/Sources/Swift/Core/Helper/SentryInAppLogic.swift +++ b/Sources/Swift/Core/Helper/SentryInAppLogic.swift @@ -28,28 +28,22 @@ import ObjectiveC @objc @_spi(Private) public class SentryInAppLogic: NSObject { @objc public let inAppIncludes: [String] - private let inAppExcludes: [String] /** - * Initializes @c SentryInAppLogic with @c inAppIncludes and @c inAppExcludes. + * Initializes @c SentryInAppLogic with @c inAppIncludes. * * To work properly for Apple applications the @c inAppIncludes should contain the * @c CFBundleExecutable, which is the name of the bundle's executable file. * - * @param inAppIncludes A list of string prefixes of framework names that belong to the app. This - * option takes precedence over @c inAppExcludes. - * @param inAppExcludes A list of string prefixes of framework names that do not belong to the app, - * but rather to third-party packages. Modules considered not part of the app will be hidden from - * stack traces by default. + * @param inAppIncludes A list of string prefixes of framework names that belong to the app. */ - @objc(initWithInAppIncludes:inAppExcludes:) public init(inAppIncludes: [String], inAppExcludes: [String]) { + @objc(initWithInAppIncludes:) public init(inAppIncludes: [String]) { self.inAppIncludes = inAppIncludes.map { $0.lowercased() } - self.inAppExcludes = inAppExcludes.map { $0.lowercased() } super.init() } /** - * Determines if the framework belongs to the app by using @c inAppIncludes and @c inAppExcludes. + * Determines if the framework belongs to the app by using @c inAppIncludes. * Before checking this method lowercases the strings and uses only the @c lastPathComponent of the * @c imagePath. * @@ -57,7 +51,7 @@ import ObjectiveC * * @return @c YES if the framework located at the @c imagePath starts with a prefix of * @c inAppIncludes. @c NO if the framework located at the @c imagePath doesn't start with a prefix of - * @c inAppIncludes or start with a prefix of @c inAppExcludes. + * @c inAppIncludes. */ @objc public func `is`(inApp imagePath: String?) -> Bool { guard let imagePath else { @@ -72,12 +66,6 @@ import ObjectiveC } } - for inAppExclude in inAppExcludes { - if imageNameLastPathComponent.hasPrefix(inAppExclude) { - return false - } - } - return false } @@ -88,8 +76,7 @@ import ObjectiveC * @param targetClass the class to check. * * @return @c YES if the @c targetClass belongs to a framework included in @c inAppIncludes. - * @c NO if targetClass does not belong to a framework in @c inAppIncludes or belongs to a framework in - * @c inAppExcludes. + * @c NO if targetClass does not belong to a framework in @c inAppIncludes. */ @objc public func isClassInApp(_ targetClass: AnyClass) -> Bool { guard let imageName = class_getImageName(targetClass) else { diff --git a/Sources/Swift/Integrations/Performance/SentryUIViewControllerPerformanceTracker.swift b/Sources/Swift/Integrations/Performance/SentryUIViewControllerPerformanceTracker.swift index 85300abe3e8..7fd25e8ed28 100644 --- a/Sources/Swift/Integrations/Performance/SentryUIViewControllerPerformanceTracker.swift +++ b/Sources/Swift/Integrations/Performance/SentryUIViewControllerPerformanceTracker.swift @@ -27,7 +27,7 @@ import UIKit override init() { let options = SentrySDKInternal.options - inAppLogic = SentryInAppLogic(inAppIncludes: options?.inAppIncludes ?? [], inAppExcludes: options?.inAppExcludes ?? []) + inAppLogic = SentryInAppLogic(inAppIncludes: options?.inAppIncludes ?? []) helper = SentryDefaultUIViewControllerPerformanceTracker(tracker: SentryPerformanceTracker.shared) } diff --git a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift index 21dc44c4810..f065a656b81 100644 --- a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift +++ b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift @@ -38,7 +38,7 @@ class SentryUIViewControllerPerformanceTrackerTests: XCTestCase { var viewControllerName: String! var inAppLogic: SentryInAppLogic { - return SentryInAppLogic(inAppIncludes: options.inAppIncludes, inAppExcludes: []) + return SentryInAppLogic(inAppIncludes: options.inAppIncludes) } init() { diff --git a/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift b/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift index d135f886bbd..3910a37dc1d 100644 --- a/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift @@ -87,7 +87,7 @@ class SentryCrashInstallationReporterTests: XCTestCase { let hub = SentryHubInternal(client: testClient, andScope: nil) SentrySDKInternal.setCurrentHub(hub) - sut = SentryCrashInstallationReporter(inAppLogic: SentryInAppLogic(inAppIncludes: [], inAppExcludes: []), crashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), dispatchQueue: TestSentryDispatchQueueWrapper()) + sut = SentryCrashInstallationReporter(inAppLogic: SentryInAppLogic(inAppIncludes: []), crashWrapper: TestSentryCrashWrapper(processInfoWrapper: ProcessInfo.processInfo), dispatchQueue: TestSentryDispatchQueueWrapper()) sut.install(options.cacheDirectoryPath) // Works only if SentryCrash is installed sentrycrash_deleteAllReports() diff --git a/Tests/SentryTests/SentryCrash/SentryCrashReportSinkTests.swift b/Tests/SentryTests/SentryCrash/SentryCrashReportSinkTests.swift index 5f9fdff8f61..abb8d7e5442 100644 --- a/Tests/SentryTests/SentryCrash/SentryCrashReportSinkTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryCrashReportSinkTests.swift @@ -9,7 +9,7 @@ class SentryCrashReportSinkTests: SentrySDKIntegrationTestsBase { let dispatchQueue = TestSentryDispatchQueueWrapper() var sut: SentryCrashReportSink { - return SentryCrashReportSink(inAppLogic: SentryInAppLogic(inAppIncludes: [], inAppExcludes: []), crashWrapper: crashWrapper, dispatchQueue: dispatchQueue) + return SentryCrashReportSink(inAppLogic: SentryInAppLogic(inAppIncludes: []), crashWrapper: crashWrapper, dispatchQueue: dispatchQueue) } } diff --git a/Tests/SentryTests/SentryCrash/SentryCrashStackEntryMapperTests.swift b/Tests/SentryTests/SentryCrash/SentryCrashStackEntryMapperTests.swift index 1e2dbe2937d..221977e05d9 100644 --- a/Tests/SentryTests/SentryCrash/SentryCrashStackEntryMapperTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryCrashStackEntryMapperTests.swift @@ -11,7 +11,7 @@ class SentryCrashStackEntryMapperTests: XCTestCase { override func setUp() { super.setUp() - sut = SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: [bundleExecutable], inAppExcludes: [])) + sut = SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: [bundleExecutable])) } override func tearDown() { diff --git a/Tests/SentryTests/SentryCrash/SentryDefaultThreadInspectorTests.swift b/Tests/SentryTests/SentryCrash/SentryDefaultThreadInspectorTests.swift index 3663a867117..441e0e834ab 100644 --- a/Tests/SentryTests/SentryCrash/SentryDefaultThreadInspectorTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryDefaultThreadInspectorTests.swift @@ -6,13 +6,13 @@ class SentryDefaultThreadInspectorTests: XCTestCase { private class Fixture { var testMachineContextWrapper = TestMachineContextWrapper() - var stacktraceBuilder = TestSentryStacktraceBuilder(crashStackEntryMapper: SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: [], inAppExcludes: []))) + var stacktraceBuilder = TestSentryStacktraceBuilder(crashStackEntryMapper: SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: []))) var keepThreadAlive = true func getSut(testWithRealMachineContextWrapper: Bool = false, symbolicate: Bool = true) -> SentryDefaultThreadInspector { let machineContextWrapper = testWithRealMachineContextWrapper ? SentryCrashDefaultMachineContextWrapper() : testMachineContextWrapper as SentryCrashMachineContextWrapper - let stacktraceBuilder = testWithRealMachineContextWrapper ? SentryStacktraceBuilder(crashStackEntryMapper: SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: [], inAppExcludes: []))) : self.stacktraceBuilder + let stacktraceBuilder = testWithRealMachineContextWrapper ? SentryStacktraceBuilder(crashStackEntryMapper: SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: []))) : self.stacktraceBuilder stacktraceBuilder.symbolicate = symbolicate diff --git a/Tests/SentryTests/SentryCrash/SentryInAppLogicTests.swift b/Tests/SentryTests/SentryCrash/SentryInAppLogicTests.swift index 1631c6697d3..23e18a923be 100644 --- a/Tests/SentryTests/SentryCrash/SentryInAppLogicTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryInAppLogicTests.swift @@ -5,11 +5,10 @@ class SentryInAppLogicTests: XCTestCase { private class Fixture { - func getSut(inAppIncludes: [String] = [], inAppExcludes: [String] = [] ) -> SentryInAppLogic { + func getSut(inAppIncludes: [String] = [] ) -> SentryInAppLogic { return SentryInAppLogic( - inAppIncludes: inAppIncludes, - inAppExcludes: inAppExcludes + inAppIncludes: inAppIncludes ) } } @@ -50,28 +49,21 @@ class SentryInAppLogicTests: XCTestCase { func testInAppExclude_WithSpecifiedFramework() { XCTAssertFalse( - fixture.getSut(inAppExcludes: ["iOS-Swift"]) - .is(inApp: "/private/var/containers/Bundle/Application/D987FC7A-629E-41DD-A043-5097EB29E2F4/iOS-Swift.app/iOS-Swift") - ) - } - - func testInAppExclude_WithLowercasePrefix() { - XCTAssertFalse( - fixture.getSut(inAppExcludes: ["i"]) + fixture.getSut() .is(inApp: "/private/var/containers/Bundle/Application/D987FC7A-629E-41DD-A043-5097EB29E2F4/iOS-Swift.app/iOS-Swift") ) } func testInAppIncludeTakesPrecedence() { XCTAssertTrue( - fixture.getSut(inAppIncludes: ["libdyld.dylib"], inAppExcludes: ["libdyld.dylib"]) + fixture.getSut(inAppIncludes: ["libdyld.dylib"]) .is(inApp: "/usr/lib/system/libdyld.dylib") ) } func testInApp_WithNotMatchingIncludeButMatchingExclude() { XCTAssertFalse( - fixture.getSut(inAppIncludes: ["iOS-Swifta"], inAppExcludes: ["iOS-Swift"]) + fixture.getSut(inAppIncludes: ["iOS-Swifta"]) .is(inApp: "/private/var/containers/Bundle/Application/D987FC7A-629E-41DD-A043-5097EB29E2F4/iOS-Swift.app/iOS-Swift") ) } @@ -177,8 +169,8 @@ class SentryInAppLogicTests: XCTestCase { testWithImages(images: images, inAppIncludes: ["watchOS-Swift WatchKit Extension"]) } - private func testWithImages(images: Images, inAppIncludes: [String], inAppExcludes: [String] = []) { - let sut = fixture.getSut(inAppIncludes: inAppIncludes, inAppExcludes: inAppExcludes) + private func testWithImages(images: Images, inAppIncludes: [String]) { + let sut = fixture.getSut(inAppIncludes: inAppIncludes) XCTAssertTrue(sut.is(inApp: images.bundleExecutable)) images.privateFrameworks.forEach { XCTAssertTrue(sut.is(inApp: $0)) diff --git a/Tests/SentryTests/SentryCrash/SentryStacktraceBuilderTests.swift b/Tests/SentryTests/SentryCrash/SentryStacktraceBuilderTests.swift index 7152ea0ef8d..a27bec99fda 100644 --- a/Tests/SentryTests/SentryCrash/SentryStacktraceBuilderTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryStacktraceBuilderTests.swift @@ -9,7 +9,7 @@ class SentryStacktraceBuilderTests: XCTestCase { var sut: SentryStacktraceBuilder { SentryDependencyContainer.sharedInstance().reachability = TestSentryReachability() - let res = SentryStacktraceBuilder(crashStackEntryMapper: SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: [], inAppExcludes: []))) + let res = SentryStacktraceBuilder(crashStackEntryMapper: SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: []))) res.symbolicate = true return res } diff --git a/Tests/SentryTests/SentryCrash/TestThreadInspector.swift b/Tests/SentryTests/SentryCrash/TestThreadInspector.swift index b9d8485e65b..e0aa7062e65 100644 --- a/Tests/SentryTests/SentryCrash/TestThreadInspector.swift +++ b/Tests/SentryTests/SentryCrash/TestThreadInspector.swift @@ -7,7 +7,7 @@ class TestDefaultThreadInspector: SentryDefaultThreadInspector { static var instance: TestDefaultThreadInspector { // We need something to pass to the super initializer, because the empty initializer has been marked unavailable. - let inAppLogic = SentryInAppLogic(inAppIncludes: [], inAppExcludes: []) + let inAppLogic = SentryInAppLogic(inAppIncludes: []) let crashStackEntryMapper = SentryCrashStackEntryMapper(inAppLogic: inAppLogic) let stacktraceBuilder = SentryStacktraceBuilder(crashStackEntryMapper: crashStackEntryMapper) return TestDefaultThreadInspector(stacktraceBuilder: stacktraceBuilder, andMachineContextWrapper: SentryCrashDefaultMachineContextWrapper(), symbolicate: false) diff --git a/Tests/SentryTests/SentryCrashReportConverterTests.m b/Tests/SentryTests/SentryCrashReportConverterTests.m index 53a55a5e257..cae05ffb0fb 100644 --- a/Tests/SentryTests/SentryCrashReportConverterTests.m +++ b/Tests/SentryTests/SentryCrashReportConverterTests.m @@ -25,7 +25,7 @@ @implementation SentryCrashReportConverterTests - (void)setUp { [super setUp]; - self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:@[] inAppExcludes:@[]]; + self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:@[]]; } - (void)tearDown diff --git a/Tests/SentryTests/SentryOptionsTest.m b/Tests/SentryTests/SentryOptionsTest.m index 97ff6820ad5..4b83b144d9b 100644 --- a/Tests/SentryTests/SentryOptionsTest.m +++ b/Tests/SentryTests/SentryOptionsTest.m @@ -647,7 +647,6 @@ - (void)testNSNull_SetsDefaultValue @"profilesSampler" : [NSNull null], #endif // SENTRY_TARGET_PROFILING_SUPPORTED @"inAppIncludes" : [NSNull null], - @"inAppExcludes" : [NSNull null], @"urlSessionDelegate" : [NSNull null], @"enableSwizzling" : [NSNull null], @"swizzleClassNameExcludes" : [NSNull null], @@ -707,7 +706,6 @@ - (void)assertDefaultValues:(SentryOptions *)options XCTAssertNil(options.tracesSampleRate); XCTAssertNil(options.tracesSampler); XCTAssertEqualObjects([self getDefaultInAppIncludes], options.inAppIncludes); - XCTAssertEqual(@[], options.inAppExcludes); XCTAssertNil(options.urlSessionDelegate); XCTAssertNil(options.urlSession); XCTAssertEqual(YES, options.enableSwizzling); @@ -1106,29 +1104,6 @@ - (void)testDefaultInAppIncludes XCTAssertEqualObjects([self getDefaultInAppIncludes], options.inAppIncludes); } -- (void)testInAppExcludes -{ - NSArray *expected = @[ @"Sentry" ]; - NSArray *inAppExcludes = @[ @"Sentry", @2 ]; - - SentryOptions *options = [self getValidOptions:@{ @"inAppExcludes" : inAppExcludes }]; - - XCTAssertEqualObjects(expected, options.inAppExcludes); -} - -- (void)testAddInAppExcludes -{ - SentryOptions *options = [self getValidOptions:@{}]; - [options addInAppExclude:@"App"]; - XCTAssertEqualObjects(@[ @"App" ], options.inAppExcludes); -} - -- (void)testDefaultInAppExcludes -{ - SentryOptions *options = [self getValidOptions:@{}]; - XCTAssertEqualObjects(@[], options.inAppExcludes); -} - - (void)testDefaultInitialScope { SentryOptions *options = [self getValidOptions:@{}]; diff --git a/sdk_api.json b/sdk_api.json index 421c60ca586..b3f2fad3c37 100644 --- a/sdk_api.json +++ b/sdk_api.json @@ -19582,105 +19582,6 @@ ], "funcSelfKind": "NonMutating" }, - { - "kind": "Var", - "name": "inAppExcludes", - "printedName": "inAppExcludes", - "children": [ - { - "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sa" - } - ], - "declKind": "Var", - "usr": "c:objc(cs)SentryOptions(py)inAppExcludes", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "inAppExcludes", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sa" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryOptions(im)inAppExcludes", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "inAppExcludes", - "declAttributes": [ - "DiscardableResult", - "ObjC", - "Dynamic" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Function", - "name": "add", - "printedName": "add(inAppExclude:)", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Func", - "usr": "c:objc(cs)SentryOptions(im)addInAppExclude:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "addInAppExclude:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "funcSelfKind": "NonMutating" - }, { "kind": "Var", "name": "urlSessionDelegate",