Skip to content

Commit 35f6d9e

Browse files
authored
chore: Removes unused objc attributes from various initializers (#6489)
1 parent ea3f7b6 commit 35f6d9e

File tree

11 files changed

+12
-14
lines changed

11 files changed

+12
-14
lines changed

Sources/Swift/Core/MetricKit/SentryMXManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import MetricKit
2323

2424
let disableCrashDiagnostics: Bool
2525

26-
public init(disableCrashDiagnostics: Bool = true) {
26+
init(disableCrashDiagnostics: Bool = true) {
2727
self.disableCrashDiagnostics = disableCrashDiagnostics
2828
}
2929

Sources/Swift/Helper/SentryExtraContextProvider.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
#if (os(iOS) || targetEnvironment(macCatalyst)) && !SENTRY_NO_UIKIT
1414
private let deviceWrapper: SentryUIDeviceWrapper
1515

16-
@objc public init(crashWrapper: SentryCrashWrapper, processInfoWrapper: SentryProcessInfoSource, deviceWrapper: SentryUIDeviceWrapper) {
16+
init(crashWrapper: SentryCrashWrapper, processInfoWrapper: SentryProcessInfoSource, deviceWrapper: SentryUIDeviceWrapper) {
1717
self.crashWrapper = crashWrapper
1818
self.processInfoWrapper = processInfoWrapper
1919
self.deviceWrapper = deviceWrapper
2020
}
2121
#else
22-
@objc public init(crashWrapper: SentryCrashWrapper, processInfoWrapper: SentryProcessInfoSource) {
22+
init(crashWrapper: SentryCrashWrapper, processInfoWrapper: SentryProcessInfoSource) {
2323
self.crashWrapper = crashWrapper
2424
self.processInfoWrapper = processInfoWrapper
2525
}

Sources/Swift/Helper/ThreadSafeApplication.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import UIKit
44
@objc @_spi(Private) public final class SentryThreadsafeApplication: NSObject {
55
private let notificationCenter: SentryNSNotificationCenterWrapper
66

7-
@objc public init(applicationProvider: () -> SentryApplication?, notificationCenter: SentryNSNotificationCenterWrapper) {
7+
init(applicationProvider: () -> SentryApplication?, notificationCenter: SentryNSNotificationCenterWrapper) {
88
self.notificationCenter = notificationCenter
99
// This matches the ObjC behavior which did not initialize the state when the UIApplication was null
1010
// so it kept a default value of 0 which happens to be defined to be `active`.

Sources/Swift/Integrations/Performance/SentryUIViewControllerPerformanceTracker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import UIKit
2525

2626
@objc private let helper: SentryDefaultUIViewControllerPerformanceTracker
2727

28-
@objc public override init() {
28+
override init() {
2929
let options = SentrySDKInternal.options
3030
inAppLogic = SentryInAppLogic(inAppIncludes: options?.inAppIncludes ?? [], inAppExcludes: options?.inAppExcludes ?? [])
3131
helper = SentryDefaultUIViewControllerPerformanceTracker(tracker: SentryPerformanceTracker.shared)

Sources/Swift/Integrations/Session/SessionTracker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ typealias Application = NSApplication
2424

2525
// MARK: Lifecycle
2626

27-
@objc public init(options: Options, applicationProvider: @escaping () -> SentryApplication?, dateProvider: SentryCurrentDateProvider, notificationCenter: SentryNSNotificationCenterWrapper) {
27+
init(options: Options, applicationProvider: @escaping () -> SentryApplication?, dateProvider: SentryCurrentDateProvider, notificationCenter: SentryNSNotificationCenterWrapper) {
2828
self.options = options
2929
self.applicationProvider = applicationProvider
3030
self.dateProvider = dateProvider

Sources/Swift/Integrations/WatchdogTerminations/Processors/SentryWatchdogTerminationAttributesProcessor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
private let dispatchQueueWrapper: SentryDispatchQueueWrapper
88
private let scopePersistentStore: SentryScopePersistentStore?
99

10-
public init(
10+
init(
1111
withDispatchQueueWrapper dispatchQueueWrapper: SentryDispatchQueueWrapper,
1212
scopePersistentStore: SentryScopePersistentStore?
1313
) {

Sources/Swift/Networking/RetryAfterHeaderParser.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ public final class RetryAfterHeaderParser: NSObject {
1010
private let httpDateParser: HttpDateParser
1111
private let currentDateProvider: SentryCurrentDateProvider
1212

13-
@objc
14-
public init(httpDateParser: HttpDateParser, currentDateProvider: SentryCurrentDateProvider) {
13+
init(httpDateParser: HttpDateParser, currentDateProvider: SentryCurrentDateProvider) {
1514
self.httpDateParser = httpDateParser
1615
self.currentDateProvider = currentDateProvider
1716
super.init()

Sources/Swift/Persistence/SentryScopePersistentStore.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ enum SentryScopeField: UInt, CaseIterable {
3434
@_spi(Private) public class SentryScopePersistentStore: NSObject {
3535
private let fileManager: SentryFileManagerProtocol
3636

37-
@objc
38-
public init?(fileManager: SentryFileManagerProtocol?) {
37+
init?(fileManager: SentryFileManagerProtocol?) {
3938
guard let fileManager else { return nil }
4039

4140
self.fileManager = fileManager

Sources/Swift/SentryAppStateManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import UIKit
1515
private let helper: SentryDefaultAppStateManager
1616
#endif
1717

18-
@objc public init(options: Options?, crashWrapper: SentryCrashWrapper, fileManager: SentryFileManager?, sysctlWrapper: SentrySysctl) {
18+
init(options: Options?, crashWrapper: SentryCrashWrapper, fileManager: SentryFileManager?, sysctlWrapper: SentrySysctl) {
1919
self.options = options
2020
self.crashWrapper = crashWrapper
2121
self.fileManager = fileManager

Sources/Swift/SentryCrash/SentryCrashSwift.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private final class CrashReportFilterBridge: NSObject, SentryCrashReportFilter {
2727

2828
private let sentryCrash: SentryCrash
2929

30-
@objc public init(with basePath: String?) {
30+
init(with basePath: String?) {
3131
sentryCrash = SentryCrash(basePath: basePath)
3232
}
3333

0 commit comments

Comments
 (0)