Skip to content

Commit fa9a4bb

Browse files
authored
chore: Use final where possible (#6365)
1 parent ba80daf commit fa9a4bb

File tree

14 files changed

+289
-120
lines changed

14 files changed

+289
-120
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### Breaking Changes
66

7+
- Moves `SentryEventDecoder` to SPI (#6365)
8+
- Makes `PreviewRedactOptions`, `SentryProfileOptions`, `SentryRedactViewHelper`, `SentryViewScreenshotOptions`, `SentryReplayOptions`, `SentryUserFeedbackConfiguration`, `SentryUserFeedbackFormConfiguration`, `SentryUserFeedbackThemeConfiguration`, `SentryUserFeedbackWidgetConfiguration`, `SentryFeedback`, and `SentryExperimentalOptions` `final` (#6365)
79
- Removes Decodable conformances from the public API of model classes (#5691)
810
- Removes deprecated user feedback API, this is replaced with the new feedback API (#5591)
911
- Removes `enablePerformanceV2` option and makes this the default. The app start duration will now finish when the first frame is drawn instead of when the OS posts the UIWindowDidBecomeVisibleNotification. (#6008)

Sources/SentrySwiftUI/Preview/PreviewRedactOptions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Sentry
66
*
77
* - Note: See ``SentryReplayOptions.DefaultValues`` for the default values of each parameter.
88
*/
9-
public class PreviewRedactOptions: SentryRedactOptions {
9+
public final class PreviewRedactOptions: SentryRedactOptions {
1010
/**
1111
* Flag to redact all text in the app by drawing a rectangle over it.
1212
*

Sources/Swift/Core/Integrations/Performance/SentryProfileOptions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99
/// will have no effect, nor will `SentrySDK.startProfiler()` or `SentrySDK.stopProfiler()`.
1010
/// - note: Profiling is automatically disabled if a thread sanitizer is attached.
1111
@objcMembers
12-
public class SentryProfileOptions: NSObject {
12+
public final class SentryProfileOptions: NSObject {
1313
/// Different modes for starting and stopping the profiler.
1414
@objc public enum SentryProfileLifecycle: Int {
1515
/// Profiling is controlled manually, and is independent of transactions & spans. Developers

Sources/Swift/Core/Tools/ViewCapture/SentryRedactViewHelper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import WebKit
88
#endif
99

1010
@objcMembers
11-
public class SentryRedactViewHelper: NSObject {
11+
public final class SentryRedactViewHelper: NSObject {
1212
private static var associatedRedactObjectHandle: UInt8 = 0
1313
private static var associatedIgnoreObjectHandle: UInt8 = 0
1414
private static var associatedClipOutObjectHandle: UInt8 = 0

Sources/Swift/Integrations/Screenshot/SentryScreenshotOptions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import Foundation
22

33
@objcMembers
4-
public class SentryViewScreenshotOptions: NSObject, SentryRedactOptions {
4+
public final class SentryViewScreenshotOptions: NSObject, SentryRedactOptions {
55
/**
66
* Default values for the screenshot options.
77
*
88
* - Note: These values are used to ensure the different initializers use the same default values.
99
*/
10-
public class DefaultValues {
10+
public final class DefaultValues {
1111
public static let enableViewRendererV2: Bool = true
1212
public static let enableFastViewRendering: Bool = false
1313

Sources/Swift/Integrations/SessionReplay/SentryReplayOptions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
import Foundation
33

44
@objcMembers
5-
public class SentryReplayOptions: NSObject, SentryRedactOptions {
5+
public final class SentryReplayOptions: NSObject, SentryRedactOptions {
66
/**
77
* Default values for the session replay options.
88
*
99
* - Note: These values are used to ensure the different initializers use the same default values.
1010
*/
11-
public class DefaultValues {
11+
public final class DefaultValues {
1212
public static let sessionSampleRate: Float = 0
1313
public static let onErrorSampleRate: Float = 0
1414
public static let maskAllText: Bool = true

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import UIKit
88
*/
99
@available(iOS 13.0, *)
1010
@objcMembers
11-
public class SentryUserFeedbackConfiguration: NSObject {
11+
public final class SentryUserFeedbackConfiguration: NSObject {
1212
/**
1313
* Whether or not to show animations, like for presenting and dismissing the form.
1414
* - note: Default: `true`.

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackFormConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import UIKit
77
*/
88
@available(iOS 13.0, *)
99
@objcMembers
10-
public class SentryUserFeedbackFormConfiguration: NSObject {
10+
public final class SentryUserFeedbackFormConfiguration: NSObject {
1111
// MARK: General settings
1212

1313
/**

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackThemeConfiguration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import UIKit
77
*/
88
@available(iOS 13.0, *)
99
@objcMembers
10-
public class SentryUserFeedbackThemeConfiguration: NSObject {
10+
public final class SentryUserFeedbackThemeConfiguration: NSObject {
1111
/**
1212
* The font family to use for form text elements.
1313
* - note: Defaults to the system default, if this property is `nil`.
@@ -93,7 +93,7 @@ public class SentryUserFeedbackThemeConfiguration: NSObject {
9393
*/
9494
public var errorColor = UIScreen.main.traitCollection.userInterfaceStyle == .dark ? UIColor(red: 245 / 255, green: 84 / 255, blue: 89 / 255, alpha: 1) : UIColor(red: 223 / 255, green: 51 / 255, blue: 56 / 255, alpha: 1)
9595

96-
@objc public class SentryFormElementOutlineStyle: NSObject {
96+
@objc public final class SentryFormElementOutlineStyle: NSObject {
9797
/**
9898
* Outline color for form inputs.
9999
* - note: Default: The system default of a UITextField outline with borderStyle of .roundedRect.

Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackWidgetConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import UIKit
77
*/
88
@available(iOS 13.0, *)
99
@objcMembers
10-
public class SentryUserFeedbackWidgetConfiguration: NSObject {
10+
public final class SentryUserFeedbackWidgetConfiguration: NSObject {
1111
/**
1212
* Automatically inject the widget button into the application UI.
1313
* - note: Default: `true`

0 commit comments

Comments
 (0)