Skip to content

Commit 1c38c54

Browse files
committed
ref: Cleanup SentryOptions implementation
1 parent 17a26bf commit 1c38c54

File tree

3 files changed

+11
-85
lines changed

3 files changed

+11
-85
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Makes `SentryEventDecodable` internal (#5808)
1818
- The `span` property on `SentryScope` is now readonly (#5866)
1919
- Removes deprecated SentryDebugImageProvider class (#5598)
20+
- Properties on SentryOptions that had no effect on the WithoutUIKit variant are now removed from the API (#6644)
2021
- Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (#5638)
2122
- Removes deprecated TraceContext initializers (#6348)
2223
- Removes deprecated user feedback API, this is replaced with the new feedback API (#5591)

Sources/Sentry/Public/SentryOptions.h

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ NS_SWIFT_NAME(Options)
305305
*/
306306
@property (nonatomic) SentryScope * (^initialScope)(SentryScope *);
307307

308-
#if SENTRY_UIKIT_AVAILABLE
308+
#if SENTRY_HAS_UIKIT
309309
/**
310310
* When enabled, the SDK tracks performance for UIViewController subclasses.
311311
* @warning This feature is not available in @c DebugWithoutUIKit and @c ReleaseWithoutUIKit
@@ -314,6 +314,14 @@ NS_SWIFT_NAME(Options)
314314
*/
315315
@property (nonatomic, assign) BOOL enableUIViewControllerTracing;
316316

317+
/**
318+
* When enabled the SDK reports non-fully-blocking app hangs. A non-fully-blocking app hang is when
319+
* the app appears stuck to the user but can still render a few frames.
320+
*
321+
* @note The default is @c YES.
322+
*/
323+
@property (nonatomic, assign) BOOL enableReportNonFullyBlockingAppHangs;
324+
317325
/**
318326
* Automatically attaches a screenshot when capturing an error or exception.
319327
* @warning This feature is not available in @c DebugWithoutUIKit and @c ReleaseWithoutUIKit
@@ -380,7 +388,7 @@ NS_SWIFT_NAME(Options)
380388
*/
381389
@property (nonatomic, assign) BOOL enablePreWarmedAppStartTracing;
382390

383-
#endif // SENTRY_UIKIT_AVAILABLE
391+
#endif // SENTRY_HAS_UIKIT
384392

385393
#if SENTRY_TARGET_REPLAY_SUPPORTED
386394

@@ -572,18 +580,6 @@ typedef void (^SentryProfilingConfigurationBlock)(SentryProfileOptions *_Nonnull
572580
*/
573581
@property (nonatomic, assign) BOOL enableAppHangTracking;
574582

575-
#if SENTRY_UIKIT_AVAILABLE
576-
577-
/**
578-
* When enabled the SDK reports non-fully-blocking app hangs. A non-fully-blocking app hang is when
579-
* the app appears stuck to the user but can still render a few frames.
580-
*
581-
* @note The default is @c YES.
582-
*/
583-
@property (nonatomic, assign) BOOL enableReportNonFullyBlockingAppHangs;
584-
585-
#endif // SENTRY_UIKIT_AVAILABLE
586-
587583
/**
588584
* The minimum amount of time an app should be unresponsive to be classified as an App Hanging.
589585
* @note The actual amount may be a little longer.

Sources/Sentry/SentryOptions.m

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,6 @@ - (void)setTracesSampleRate:(NSNumber *)tracesSampleRate
263263
}
264264
}
265265

266-
- (void)setTracesSampler:(SentryTracesSamplerCallback)tracesSampler
267-
{
268-
_tracesSampler = tracesSampler;
269-
}
270-
271266
- (BOOL)isTracingEnabled
272267
{
273268
return (_tracesSampleRate != nil && [_tracesSampleRate doubleValue] > 0)
@@ -289,39 +284,6 @@ - (BOOL)isProfilingCorrelatedToTraces
289284

290285
#if SENTRY_UIKIT_AVAILABLE
291286

292-
- (void)setEnableUIViewControllerTracing:(BOOL)enableUIViewControllerTracing
293-
{
294-
# if SENTRY_HAS_UIKIT
295-
_enableUIViewControllerTracing = enableUIViewControllerTracing;
296-
# else
297-
SENTRY_GRACEFUL_FATAL(
298-
@"enableUIViewControllerTracing only works with UIKit enabled. Ensure you're "
299-
@"using the right configuration of Sentry that links UIKit.");
300-
# endif // SENTRY_HAS_UIKIT
301-
}
302-
303-
- (void)setAttachScreenshot:(BOOL)attachScreenshot
304-
{
305-
# if SENTRY_HAS_UIKIT
306-
_attachScreenshot = attachScreenshot;
307-
# else
308-
SENTRY_GRACEFUL_FATAL(
309-
@"attachScreenshot only works with UIKit enabled. Ensure you're using the "
310-
@"right configuration of Sentry that links UIKit.");
311-
# endif // SENTRY_HAS_UIKIT
312-
}
313-
314-
- (void)setAttachViewHierarchy:(BOOL)attachViewHierarchy
315-
{
316-
# if SENTRY_HAS_UIKIT
317-
_attachViewHierarchy = attachViewHierarchy;
318-
# else
319-
SENTRY_GRACEFUL_FATAL(
320-
@"attachViewHierarchy only works with UIKit enabled. Ensure you're using the "
321-
@"right configuration of Sentry that links UIKit.");
322-
# endif // SENTRY_HAS_UIKIT
323-
}
324-
325287
# if SENTRY_TARGET_REPLAY_SUPPORTED
326288

327289
- (BOOL)enableViewRendererV2
@@ -336,39 +298,6 @@ - (BOOL)enableFastViewRendering
336298

337299
# endif // SENTRY_TARGET_REPLAY_SUPPORTED
338300

339-
- (void)setEnableUserInteractionTracing:(BOOL)enableUserInteractionTracing
340-
{
341-
# if SENTRY_HAS_UIKIT
342-
_enableUserInteractionTracing = enableUserInteractionTracing;
343-
# else
344-
SENTRY_GRACEFUL_FATAL(
345-
@"enableUserInteractionTracing only works with UIKit enabled. Ensure you're "
346-
@"using the right configuration of Sentry that links UIKit.");
347-
# endif // SENTRY_HAS_UIKIT
348-
}
349-
350-
- (void)setIdleTimeout:(NSTimeInterval)idleTimeout
351-
{
352-
# if SENTRY_HAS_UIKIT
353-
_idleTimeout = idleTimeout;
354-
# else
355-
SENTRY_GRACEFUL_FATAL(
356-
@"idleTimeout only works with UIKit enabled. Ensure you're using the right "
357-
@"configuration of Sentry that links UIKit.");
358-
# endif // SENTRY_HAS_UIKIT
359-
}
360-
361-
- (void)setEnablePreWarmedAppStartTracing:(BOOL)enablePreWarmedAppStartTracing
362-
{
363-
# if SENTRY_HAS_UIKIT
364-
_enablePreWarmedAppStartTracing = enablePreWarmedAppStartTracing;
365-
# else
366-
SENTRY_GRACEFUL_FATAL(
367-
@"enablePreWarmedAppStartTracing only works with UIKit enabled. Ensure you're "
368-
@"using the right configuration of Sentry that links UIKit.");
369-
# endif // SENTRY_HAS_UIKIT
370-
}
371-
372301
#endif // SENTRY_UIKIT_AVAILABLE
373302

374303
- (void)setEnableSpotlight:(BOOL)value

0 commit comments

Comments
 (0)