Skip to content

Commit 7a6765c

Browse files
committed
fix: Remove property that had no effect
1 parent 8bccc72 commit 7a6765c

22 files changed

+29
-209
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Removes `SentryIntegrationProtocol` from the API. This is not used after the removal of the `integrations` property (#6660)
2222
- Removes deprecated SentryDebugImageProvider class (#5598)
2323
- Properties on SentryOptions that had no effect on the WithoutUIKit variant are now removed from the API (#6644)
24+
- Removes the SentryOptions.inAppExclude property because it had no effect (#6646)
2425
- Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (#5638)
2526
- Removes deprecated TraceContext initializers (#6348)
2627
- Removes deprecated user feedback API, this is replaced with the new feedback API (#5591)

Sources/Sentry/Public/SentryOptions.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ NS_SWIFT_NAME(Options)
452452

453453
/**
454454
* A list of string prefixes of framework names that belong to the app.
455-
* @note This option takes precedence over @c inAppExcludes.
456455
* @note By default, this contains @c CFBundleExecutable to mark it as "in-app".
457456
*/
458457
@property (nonatomic, readonly, copy) NSArray<NSString *> *inAppIncludes;
@@ -463,21 +462,6 @@ NS_SWIFT_NAME(Options)
463462
*/
464463
- (void)addInAppInclude:(NSString *)inAppInclude;
465464

466-
/**
467-
* A list of string prefixes of framework names that do not belong to the app, but rather to
468-
* third-party frameworks.
469-
* @note By default, frameworks considered not part of the app will be hidden from stack
470-
* traces.
471-
* @note This option can be overridden using @c inAppIncludes.
472-
*/
473-
@property (nonatomic, readonly, copy) NSArray<NSString *> *inAppExcludes;
474-
475-
/**
476-
* Adds an item to the list of @c inAppExcludes.
477-
* @param inAppExclude The prefix of the frameworks name.
478-
*/
479-
- (void)addInAppExclude:(NSString *)inAppExclude;
480-
481465
/**
482466
* Set as delegate on the @c NSURLSession used for all network data-transfer tasks performed by
483467
* Sentry.

Sources/Sentry/SentryCrashIntegration.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ - (void)startCrashHandler:(NSString *)cacheDirectory
145145
BOOL canSendReports = NO;
146146
if (installation == nil) {
147147
SentryInAppLogic *inAppLogic =
148-
[[SentryInAppLogic alloc] initWithInAppIncludes:self.options.inAppIncludes
149-
inAppExcludes:self.options.inAppExcludes];
148+
[[SentryInAppLogic alloc] initWithInAppIncludes:self.options.inAppIncludes];
150149

151150
installation = [[SentryCrashInstallationReporter alloc]
152151
initWithInAppLogic:inAppLogic

Sources/Sentry/SentryDefaultThreadInspector.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ - (id)initWithStacktraceBuilder:(SentryStacktraceBuilder *)stacktraceBuilder
6969
- (instancetype)initWithOptions:(SentryOptions *_Nullable)options
7070
{
7171
SentryInAppLogic *inAppLogic =
72-
[[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes ?: @[]
73-
inAppExcludes:options.inAppExcludes ?: @[]];
72+
[[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes ?: @[]];
7473
SentryCrashStackEntryMapper *crashStackEntryMapper =
7574
[[SentryCrashStackEntryMapper alloc] initWithInAppLogic:inAppLogic];
7675
SentryStacktraceBuilder *stacktraceBuilder =

Sources/Sentry/SentryMetricKitIntegration.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ - (BOOL)installWithOptions:(SentryOptions *)options
6767
self.measurementFormatter = [[NSMeasurementFormatter alloc] init];
6868
self.measurementFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
6969
self.measurementFormatter.unitOptions = NSMeasurementFormatterUnitOptionsProvidedUnit;
70-
self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes
71-
inAppExcludes:options.inAppExcludes];
70+
self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes];
7271
self.attachDiagnosticAsAttachment = options.enableMetricKitRawPayload;
7372

7473
return YES;

Sources/Sentry/SentryOptions.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ - (instancetype)init
139139
_inAppIncludes = @[ bundleExecutable ];
140140
}
141141

142-
_inAppExcludes = [NSArray new];
143-
144142
// Set default release name
145143
if (infoDict != nil) {
146144
self.releaseName =
@@ -216,11 +214,6 @@ - (void)addInAppInclude:(NSString *)inAppInclude
216214
_inAppIncludes = [self.inAppIncludes arrayByAddingObject:inAppInclude];
217215
}
218216

219-
- (void)addInAppExclude:(NSString *)inAppExclude
220-
{
221-
_inAppExcludes = [self.inAppExcludes arrayByAddingObject:inAppExclude];
222-
}
223-
224217
- (void)setSampleRate:(NSNumber *)sampleRate
225218
{
226219
if (sampleRate == nil) {

Sources/Sentry/SentryOptionsInternal.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,6 @@ + (BOOL)validateOptions:(NSDictionary<NSString *, id> *)options
252252
}
253253
}
254254

255-
if ([options[@"inAppExcludes"] isKindOfClass:[NSArray class]]) {
256-
NSArray<NSString *> *inAppExcludes =
257-
[options[@"inAppExcludes"] filteredArrayUsingPredicate:isNSString];
258-
for (NSString *exclude in inAppExcludes) {
259-
[sentryOptions addInAppExclude:exclude];
260-
}
261-
}
262-
263255
if ([options[@"urlSession"] isKindOfClass:[NSURLSession class]]) {
264256
sentryOptions.urlSession = options[@"urlSession"];
265257
}

Sources/Sentry/SentryUIViewControllerSwizzling.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ - (instancetype)initWithOptions:(SentryOptions *)options
5151
{
5252
if (self = [super init]) {
5353
self.options = options;
54-
self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes
55-
inAppExcludes:options.inAppExcludes];
54+
self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes];
5655
self.dispatchQueue = dispatchQueue;
5756
self.objcRuntimeWrapper = objcRuntimeWrapper;
5857
self.subClassFinder = subClassFinder;

Sources/Sentry/SentryUseNSExceptionCallstackWrapper.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ - (SentryCrashStackEntryMapper *)buildCrashStackToEntryMapper
6161
SentryOptions *options = SentrySDKInternal.options;
6262

6363
SentryInAppLogic *inAppLogic =
64-
[[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes
65-
inAppExcludes:options.inAppExcludes];
64+
[[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes];
6665
SentryCrashStackEntryMapper *crashStackEntryMapper =
6766
[[SentryCrashStackEntryMapper alloc] initWithInAppLogic:inAppLogic];
6867

Sources/Swift/Core/Helper/SentryInAppLogic.swift

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,30 @@ import ObjectiveC
2828
@objc @_spi(Private) public class SentryInAppLogic: NSObject {
2929

3030
@objc public let inAppIncludes: [String]
31-
private let inAppExcludes: [String]
3231

3332
/**
34-
* Initializes @c SentryInAppLogic with @c inAppIncludes and @c inAppExcludes.
33+
* Initializes @c SentryInAppLogic with @c inAppIncludes.
3534
*
3635
* To work properly for Apple applications the @c inAppIncludes should contain the
3736
* @c CFBundleExecutable, which is the name of the bundle's executable file.
3837
*
39-
* @param inAppIncludes A list of string prefixes of framework names that belong to the app. This
40-
* option takes precedence over @c inAppExcludes.
41-
* @param inAppExcludes A list of string prefixes of framework names that do not belong to the app,
42-
* but rather to third-party packages. Modules considered not part of the app will be hidden from
43-
* stack traces by default.
38+
* @param inAppIncludes A list of string prefixes of framework names that belong to the app.
4439
*/
45-
@objc(initWithInAppIncludes:inAppExcludes:) public init(inAppIncludes: [String], inAppExcludes: [String]) {
40+
@objc(initWithInAppIncludes:) public init(inAppIncludes: [String]) {
4641
self.inAppIncludes = inAppIncludes.map { $0.lowercased() }
47-
self.inAppExcludes = inAppExcludes.map { $0.lowercased() }
4842
super.init()
4943
}
5044

5145
/**
52-
* Determines if the framework belongs to the app by using @c inAppIncludes and @c inAppExcludes.
46+
* Determines if the framework belongs to the app by using @c inAppIncludes.
5347
* Before checking this method lowercases the strings and uses only the @c lastPathComponent of the
5448
* @c imagePath.
5549
*
5650
* @param imagePath the full path of the binary image.
5751
*
5852
* @return @c YES if the framework located at the @c imagePath starts with a prefix of
5953
* @c inAppIncludes. @c NO if the framework located at the @c imagePath doesn't start with a prefix of
60-
* @c inAppIncludes or start with a prefix of @c inAppExcludes.
54+
* @c inAppIncludes.
6155
*/
6256
@objc public func `is`(inApp imagePath: String?) -> Bool {
6357
guard let imagePath else {
@@ -72,12 +66,6 @@ import ObjectiveC
7266
}
7367
}
7468

75-
for inAppExclude in inAppExcludes {
76-
if imageNameLastPathComponent.hasPrefix(inAppExclude) {
77-
return false
78-
}
79-
}
80-
8169
return false
8270
}
8371

@@ -88,8 +76,7 @@ import ObjectiveC
8876
* @param targetClass the class to check.
8977
*
9078
* @return @c YES if the @c targetClass belongs to a framework included in @c inAppIncludes.
91-
* @c NO if targetClass does not belong to a framework in @c inAppIncludes or belongs to a framework in
92-
* @c inAppExcludes.
79+
* @c NO if targetClass does not belong to a framework in @c inAppIncludes.
9380
*/
9481
@objc public func isClassInApp(_ targetClass: AnyClass) -> Bool {
9582
guard let imageName = class_getImageName(targetClass) else {

0 commit comments

Comments
 (0)