From e2f115049093d6447abe798d1cfa76f40e5eb6d0 Mon Sep 17 00:00:00 2001 From: Kevin Renskers Date: Mon, 3 Oct 2022 16:27:46 +0200 Subject: [PATCH] ref: Clean up unused imports (#2244) --- Sources/Sentry/PrivateSentrySDKOnly.m | 1 - Sources/Sentry/Public/PrivateSentrySDKOnly.h | 2 -- Sources/Sentry/Public/SentryClient.h | 2 -- Sources/Sentry/Public/SentryError.h | 1 - Sources/Sentry/Public/SentrySDK.h | 2 -- Sources/Sentry/Public/SentryTraceHeader.h | 1 - Sources/Sentry/SentryANRTrackingIntegration.m | 4 ---- Sources/Sentry/SentryAppState.m | 1 - Sources/Sentry/SentryDependencyContainer.m | 1 - Sources/Sentry/SentryFileContents.m | 1 - Sources/Sentry/SentryMigrateSessionInit.m | 1 - Sources/Sentry/SentryOutOfMemoryTrackingIntegration.m | 3 --- Sources/Sentry/SentrySwizzleWrapper.m | 1 - Sources/Sentry/SentrySystemEventBreadcrumbs.m | 2 -- Sources/Sentry/include/SentryClient+Private.h | 1 - Sources/Sentry/include/SentryDependencyContainer.h | 1 - Sources/Sentry/include/SentryDiscardedEvent.h | 1 - Sources/Sentry/include/SentryFileManager.h | 2 -- Sources/Sentry/include/SentryLevelMapper.h | 1 - Sources/Sentry/include/SentryLog.h | 1 - Sources/Sentry/include/SentryMigrateSessionInit.h | 1 - Sources/Sentry/include/SentryScreenshot.h | 1 - Sources/Sentry/include/SentrySerialization.h | 2 -- Sources/Sentry/include/SentrySystemEventBreadcrumbs.h | 2 +- Sources/Sentry/include/SentryTraceContext.h | 1 - Sources/Sentry/include/SentryTracesSampler.h | 1 - Sources/Sentry/include/SentryUIApplication.h | 1 - Sources/Sentry/include/SentryViewHierarchy.h | 1 - Sources/SentryCrash/Installations/SentryCrashInstallation.h | 1 - .../Recording/Monitors/SentryCrashMonitor_NSException.m | 1 - Sources/SentryCrash/Recording/SentryCrash.h | 2 -- 31 files changed, 1 insertion(+), 43 deletions(-) diff --git a/Sources/Sentry/PrivateSentrySDKOnly.m b/Sources/Sentry/PrivateSentrySDKOnly.m index 2f32ebf2532..30a62ab1a2a 100644 --- a/Sources/Sentry/PrivateSentrySDKOnly.m +++ b/Sources/Sentry/PrivateSentrySDKOnly.m @@ -6,7 +6,6 @@ #import "SentryMeta.h" #import "SentrySDK+Private.h" #import "SentrySerialization.h" -#import #import #import diff --git a/Sources/Sentry/Public/PrivateSentrySDKOnly.h b/Sources/Sentry/Public/PrivateSentrySDKOnly.h index 61d278ae2a9..5cbbe17096d 100644 --- a/Sources/Sentry/Public/PrivateSentrySDKOnly.h +++ b/Sources/Sentry/Public/PrivateSentrySDKOnly.h @@ -1,5 +1,3 @@ -#import - #import "SentryDefines.h" @class SentryEnvelope, SentryDebugMeta, SentryAppStartMeasurement, SentryScreenFrames, diff --git a/Sources/Sentry/Public/SentryClient.h b/Sources/Sentry/Public/SentryClient.h index 28935314765..405256f464b 100644 --- a/Sources/Sentry/Public/SentryClient.h +++ b/Sources/Sentry/Public/SentryClient.h @@ -1,5 +1,3 @@ -#import - #import "SentryDefines.h" @class SentryOptions, SentrySession, SentryEvent, SentryEnvelope, SentryScope, SentryFileManager, diff --git a/Sources/Sentry/Public/SentryError.h b/Sources/Sentry/Public/SentryError.h index 22b6605dda7..d1f508f276e 100644 --- a/Sources/Sentry/Public/SentryError.h +++ b/Sources/Sentry/Public/SentryError.h @@ -1,5 +1,4 @@ #import "SentryDefines.h" -#import NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/Sentry/Public/SentrySDK.h b/Sources/Sentry/Public/SentrySDK.h index 41b8f0f02ce..88846ff4d3b 100644 --- a/Sources/Sentry/Public/SentrySDK.h +++ b/Sources/Sentry/Public/SentrySDK.h @@ -1,5 +1,3 @@ -#import - #import "SentryDefines.h" @protocol SentrySpan; diff --git a/Sources/Sentry/Public/SentryTraceHeader.h b/Sources/Sentry/Public/SentryTraceHeader.h index 9cd4195b6c4..92f3d200cdb 100644 --- a/Sources/Sentry/Public/SentryTraceHeader.h +++ b/Sources/Sentry/Public/SentryTraceHeader.h @@ -1,6 +1,5 @@ #import "SentryDefines.h" #import "SentrySampleDecision.h" -#import @class SentryId, SentrySpanId; diff --git a/Sources/Sentry/SentryANRTrackingIntegration.m b/Sources/Sentry/SentryANRTrackingIntegration.m index 78d32daff95..9b947eb567e 100644 --- a/Sources/Sentry/SentryANRTrackingIntegration.m +++ b/Sources/Sentry/SentryANRTrackingIntegration.m @@ -8,15 +8,11 @@ #import "SentryEvent.h" #import "SentryException.h" #import "SentryHub+Private.h" -#import "SentryLog.h" #import "SentryMechanism.h" #import "SentrySDK+Private.h" #import "SentryThread.h" #import "SentryThreadInspector.h" #import "SentryThreadWrapper.h" -#import -#import -#import #import #import diff --git a/Sources/Sentry/SentryAppState.m b/Sources/Sentry/SentryAppState.m index 7b5daa4eef1..9c339e9a3ba 100644 --- a/Sources/Sentry/SentryAppState.m +++ b/Sources/Sentry/SentryAppState.m @@ -1,4 +1,3 @@ -#import #import #import diff --git a/Sources/Sentry/SentryDependencyContainer.m b/Sources/Sentry/SentryDependencyContainer.m index d81ec2040b2..248a34cb066 100644 --- a/Sources/Sentry/SentryDependencyContainer.m +++ b/Sources/Sentry/SentryDependencyContainer.m @@ -2,7 +2,6 @@ #import "SentryDefaultCurrentDateProvider.h" #import "SentryDispatchQueueWrapper.h" #import "SentryUIApplication.h" -#import #import #import #import diff --git a/Sources/Sentry/SentryFileContents.m b/Sources/Sentry/SentryFileContents.m index f18bb61d38f..9fae5da2b13 100644 --- a/Sources/Sentry/SentryFileContents.m +++ b/Sources/Sentry/SentryFileContents.m @@ -1,5 +1,4 @@ #import "SentryFileContents.h" -#import @interface SentryFileContents () diff --git a/Sources/Sentry/SentryMigrateSessionInit.m b/Sources/Sentry/SentryMigrateSessionInit.m index e9aa074d7d7..2661cb6a283 100644 --- a/Sources/Sentry/SentryMigrateSessionInit.m +++ b/Sources/Sentry/SentryMigrateSessionInit.m @@ -4,7 +4,6 @@ #import "SentryLog.h" #import "SentrySerialization.h" #import "SentrySession+Private.h" -#import NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/Sentry/SentryOutOfMemoryTrackingIntegration.m b/Sources/Sentry/SentryOutOfMemoryTrackingIntegration.m index 102c5f66c45..d83de13656d 100644 --- a/Sources/Sentry/SentryOutOfMemoryTrackingIntegration.m +++ b/Sources/Sentry/SentryOutOfMemoryTrackingIntegration.m @@ -1,14 +1,11 @@ #import "SentryDefines.h" -#import #import #import #import #import -#import #import #import #import -#import #import #import #import diff --git a/Sources/Sentry/SentrySwizzleWrapper.m b/Sources/Sentry/SentrySwizzleWrapper.m index 7d98ecc5a0c..889f01c78e1 100644 --- a/Sources/Sentry/SentrySwizzleWrapper.m +++ b/Sources/Sentry/SentrySwizzleWrapper.m @@ -1,6 +1,5 @@ #import "SentrySwizzleWrapper.h" #import "SentrySwizzle.h" -#import NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/Sentry/SentrySystemEventBreadcrumbs.m b/Sources/Sentry/SentrySystemEventBreadcrumbs.m index f1ec4a6274e..6deb12d6d3c 100644 --- a/Sources/Sentry/SentrySystemEventBreadcrumbs.m +++ b/Sources/Sentry/SentrySystemEventBreadcrumbs.m @@ -1,6 +1,4 @@ #import "SentrySystemEventBreadcrumbs.h" -#import "SentryAppState.h" -#import "SentryAppStateManager.h" #import "SentryBreadcrumb.h" #import "SentryCurrentDateProvider.h" #import "SentryDependencyContainer.h" diff --git a/Sources/Sentry/include/SentryClient+Private.h b/Sources/Sentry/include/SentryClient+Private.h index c5478a2b8d3..dc71e7e3c6c 100644 --- a/Sources/Sentry/include/SentryClient+Private.h +++ b/Sources/Sentry/include/SentryClient+Private.h @@ -1,7 +1,6 @@ #import "SentryClient.h" #import "SentryDataCategory.h" #import "SentryDiscardReason.h" -#import @class SentryEnvelopeItem, SentryId, SentryAttachment, SentryThreadInspector; diff --git a/Sources/Sentry/include/SentryDependencyContainer.h b/Sources/Sentry/include/SentryDependencyContainer.h index aa8e3bd9507..140f75e3de8 100644 --- a/Sources/Sentry/include/SentryDependencyContainer.h +++ b/Sources/Sentry/include/SentryDependencyContainer.h @@ -1,7 +1,6 @@ #import "SentryDefines.h" #import "SentryFileManager.h" #import "SentryRandom.h" -#import @class SentryAppStateManager, SentryCrashWrapper, SentryThreadWrapper, SentrySwizzleWrapper, SentryDispatchQueueWrapper, SentryDebugImageProvider, SentryANRTracker, diff --git a/Sources/Sentry/include/SentryDiscardedEvent.h b/Sources/Sentry/include/SentryDiscardedEvent.h index 969469836d8..f2c0b85a4d4 100644 --- a/Sources/Sentry/include/SentryDiscardedEvent.h +++ b/Sources/Sentry/include/SentryDiscardedEvent.h @@ -1,7 +1,6 @@ #import "SentryDataCategory.h" #import "SentryDiscardReason.h" #import "SentrySerializable.h" -#import NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/Sentry/include/SentryFileManager.h b/Sources/Sentry/include/SentryFileManager.h index 7542dbb5520..16164615a58 100644 --- a/Sources/Sentry/include/SentryFileManager.h +++ b/Sources/Sentry/include/SentryFileManager.h @@ -1,5 +1,3 @@ -#import - #import "SentryCurrentDateProvider.h" #import "SentryDataCategory.h" #import "SentryDefines.h" diff --git a/Sources/Sentry/include/SentryLevelMapper.h b/Sources/Sentry/include/SentryLevelMapper.h index 0ec74108f6a..5304f38491d 100644 --- a/Sources/Sentry/include/SentryLevelMapper.h +++ b/Sources/Sentry/include/SentryLevelMapper.h @@ -1,5 +1,4 @@ #import "SentryDefines.h" -#import NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/Sentry/include/SentryLog.h b/Sources/Sentry/include/SentryLog.h index 237e036f4a5..310301c07dc 100644 --- a/Sources/Sentry/include/SentryLog.h +++ b/Sources/Sentry/include/SentryLog.h @@ -1,5 +1,4 @@ #import "SentryDefines.h" -#import @class SentryLogOutput; diff --git a/Sources/Sentry/include/SentryMigrateSessionInit.h b/Sources/Sentry/include/SentryMigrateSessionInit.h index e4e49eaae79..e6d2e23ae3f 100644 --- a/Sources/Sentry/include/SentryMigrateSessionInit.h +++ b/Sources/Sentry/include/SentryMigrateSessionInit.h @@ -1,5 +1,4 @@ #import "SentryDefines.h" -#import @class SentryEnvelope; diff --git a/Sources/Sentry/include/SentryScreenshot.h b/Sources/Sentry/include/SentryScreenshot.h index fe7609ee19a..84afd494836 100644 --- a/Sources/Sentry/include/SentryScreenshot.h +++ b/Sources/Sentry/include/SentryScreenshot.h @@ -1,5 +1,4 @@ #import "SentryDefines.h" -#import #if SENTRY_HAS_UIKIT diff --git a/Sources/Sentry/include/SentrySerialization.h b/Sources/Sentry/include/SentrySerialization.h index 56307731d0a..4946fadddb5 100644 --- a/Sources/Sentry/include/SentrySerialization.h +++ b/Sources/Sentry/include/SentrySerialization.h @@ -1,5 +1,3 @@ -#import - #import "SentryDefines.h" @class SentrySession, SentryEnvelope, SentryAppState; diff --git a/Sources/Sentry/include/SentrySystemEventBreadcrumbs.h b/Sources/Sentry/include/SentrySystemEventBreadcrumbs.h index be9f48f82b0..2392279359c 100644 --- a/Sources/Sentry/include/SentrySystemEventBreadcrumbs.h +++ b/Sources/Sentry/include/SentrySystemEventBreadcrumbs.h @@ -1,5 +1,5 @@ -#import "SentryAppStateManager.h" #import "SentryCurrentDateProvider.h" +#import "SentryFileManager.h" #import #if TARGET_OS_IOS diff --git a/Sources/Sentry/include/SentryTraceContext.h b/Sources/Sentry/include/SentryTraceContext.h index 818ea29c696..0958e406ac6 100644 --- a/Sources/Sentry/include/SentryTraceContext.h +++ b/Sources/Sentry/include/SentryTraceContext.h @@ -1,6 +1,5 @@ #import "SentryId.h" #import "SentrySerializable.h" -#import NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/Sentry/include/SentryTracesSampler.h b/Sources/Sentry/include/SentryTracesSampler.h index 8f005170db9..5d8dfa06397 100644 --- a/Sources/Sentry/include/SentryTracesSampler.h +++ b/Sources/Sentry/include/SentryTracesSampler.h @@ -1,6 +1,5 @@ #import "SentryRandom.h" #import "SentrySampleDecision.h" -#import NS_ASSUME_NONNULL_BEGIN diff --git a/Sources/Sentry/include/SentryUIApplication.h b/Sources/Sentry/include/SentryUIApplication.h index 51013b2a7f0..2195d220243 100644 --- a/Sources/Sentry/include/SentryUIApplication.h +++ b/Sources/Sentry/include/SentryUIApplication.h @@ -1,5 +1,4 @@ #import "SentryDefines.h" -#import #if SENTRY_HAS_UIKIT # import diff --git a/Sources/Sentry/include/SentryViewHierarchy.h b/Sources/Sentry/include/SentryViewHierarchy.h index 8d597339758..cda7447d91d 100644 --- a/Sources/Sentry/include/SentryViewHierarchy.h +++ b/Sources/Sentry/include/SentryViewHierarchy.h @@ -1,5 +1,4 @@ #import "SentryDefines.h" -#import #if SENTRY_HAS_UIKIT diff --git a/Sources/SentryCrash/Installations/SentryCrashInstallation.h b/Sources/SentryCrash/Installations/SentryCrashInstallation.h index 98f786b9165..32b8bf7b098 100644 --- a/Sources/SentryCrash/Installations/SentryCrashInstallation.h +++ b/Sources/SentryCrash/Installations/SentryCrashInstallation.h @@ -26,7 +26,6 @@ #import "SentryCrashReportFilter.h" #import "SentryCrashReportWriter.h" -#import /** * Crash system installation which handles backend-specific details. diff --git a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_NSException.m b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_NSException.m index cf619c7720d..a6f6168d734 100644 --- a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_NSException.m +++ b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_NSException.m @@ -30,7 +30,6 @@ #include "SentryCrashMonitorContext.h" #import "SentryCrashStackCursor_Backtrace.h" #include "SentryCrashThread.h" -#import //#define SentryCrashLogger_LocalLevel TRACE #import "SentryCrashLogger.h" diff --git a/Sources/SentryCrash/Recording/SentryCrash.h b/Sources/SentryCrash/Recording/SentryCrash.h index 0bddb878c0a..55b022c3441 100644 --- a/Sources/SentryCrash/Recording/SentryCrash.h +++ b/Sources/SentryCrash/Recording/SentryCrash.h @@ -24,8 +24,6 @@ // THE SOFTWARE. // -#import - #import "SentryCrashMonitorType.h" #import "SentryCrashReportFilter.h" #import "SentryCrashReportWriter.h"