From e189f83ef352401c8dd2eaca89dc7bb22911daf4 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Wed, 30 Oct 2024 12:27:01 -0800 Subject: [PATCH 1/2] ref: move integration objc sources to correct location --- Sentry.xcodeproj/project.pbxproj | 24 +++++++++---------- Sources/Sentry/SentrySDK.m | 5 ++-- .../SentryUserFeedbackIntegration.m} | 4 ++-- .../include/SentryUserFeedbackIntegration.h} | 2 +- ...SentryUserFeedbackIntegrationDriver.swift} | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) rename Sources/{Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.m => Sentry/SentryUserFeedbackIntegration.m} (79%) rename Sources/{Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.h => Sentry/include/SentryUserFeedbackIntegration.h} (76%) rename Sources/Swift/Integrations/UserFeedback/{SentryUserFeedbackIntegration.swift => SentryUserFeedbackIntegrationDriver.swift} (98%) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index fa43407d63..df9c989aa5 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -670,7 +670,7 @@ 849AC40029E0C1FF00889C16 /* SentryFormatterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849AC3FF29E0C1FF00889C16 /* SentryFormatterTests.swift */; }; 849B8F992C6E906900148E1F /* SentryUserFeedbackFormConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F942C6E906900148E1F /* SentryUserFeedbackFormConfiguration.swift */; }; 849B8F9A2C6E906900148E1F /* SentryUserFeedbackConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F952C6E906900148E1F /* SentryUserFeedbackConfiguration.swift */; }; - 849B8F9B2C6E906900148E1F /* SentryUserFeedbackIntegration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegration.swift */; }; + 849B8F9B2C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift */; }; 849B8F9C2C6E906900148E1F /* SentryUserFeedbackThemeConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F972C6E906900148E1F /* SentryUserFeedbackThemeConfiguration.swift */; }; 849B8F9D2C6E906900148E1F /* SentryUserFeedbackWidgetConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F982C6E906900148E1F /* SentryUserFeedbackWidgetConfiguration.swift */; }; 84A305492BC7328400D84283 /* SentryAppLaunchProfilingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A305472BC72A0A00D84283 /* SentryAppLaunchProfilingTests.swift */; }; @@ -704,8 +704,8 @@ 84B7FA4629B2935F00AD93B1 /* ClearTestState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD47B4C268F0B080076A663 /* ClearTestState.swift */; }; 84BA62272CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA62262CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift */; }; 84CFA4CA2C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84CFA4C92C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift */; }; - 84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m */; }; - 84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h */; }; + 84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m */; }; + 84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h */; }; 84DEE86B2B686BD400A7BC17 /* SentrySamplerDecision.h in Headers */ = {isa = PBXBuildFile; fileRef = 84DEE86A2B686BD400A7BC17 /* SentrySamplerDecision.h */; }; 84DEE8762B69AD6400A7BC17 /* SentryLaunchProfiling.h in Headers */ = {isa = PBXBuildFile; fileRef = 84DEE8752B69AD6400A7BC17 /* SentryLaunchProfiling.h */; }; 84E13B842CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E13B832CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift */; }; @@ -1745,7 +1745,7 @@ 849AC3FF29E0C1FF00889C16 /* SentryFormatterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SentryFormatterTests.swift; sourceTree = ""; }; 849B8F942C6E906900148E1F /* SentryUserFeedbackFormConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SentryUserFeedbackFormConfiguration.swift; path = Configuration/SentryUserFeedbackFormConfiguration.swift; sourceTree = ""; }; 849B8F952C6E906900148E1F /* SentryUserFeedbackConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SentryUserFeedbackConfiguration.swift; path = Configuration/SentryUserFeedbackConfiguration.swift; sourceTree = ""; }; - 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackIntegration.swift; sourceTree = ""; }; + 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackIntegrationDriver.swift; sourceTree = ""; }; 849B8F972C6E906900148E1F /* SentryUserFeedbackThemeConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SentryUserFeedbackThemeConfiguration.swift; path = Configuration/SentryUserFeedbackThemeConfiguration.swift; sourceTree = ""; }; 849B8F982C6E906900148E1F /* SentryUserFeedbackWidgetConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SentryUserFeedbackWidgetConfiguration.swift; path = Configuration/SentryUserFeedbackWidgetConfiguration.swift; sourceTree = ""; }; 84A305472BC72A0A00D84283 /* SentryAppLaunchProfilingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryAppLaunchProfilingTests.swift; sourceTree = ""; }; @@ -1770,8 +1770,8 @@ 84BA62262CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackWidgetButtonView.swift; sourceTree = ""; }; 84C47B2B2A09239100DAEB8A /* .codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .codecov.yml; sourceTree = ""; }; 84CFA4C92C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackWidget.swift; sourceTree = ""; }; - 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryUserFeedbackIntegrationShell.h; sourceTree = ""; }; - 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryUserFeedbackIntegrationShell.m; sourceTree = ""; }; + 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryUserFeedbackIntegration.h; path = ../../../Sentry/include/SentryUserFeedbackIntegration.h; sourceTree = ""; }; + 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SentryUserFeedbackIntegration.m; path = ../../../Sentry/SentryUserFeedbackIntegration.m; sourceTree = ""; }; 84DEE86A2B686BD400A7BC17 /* SentrySamplerDecision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentrySamplerDecision.h; path = include/SentrySamplerDecision.h; sourceTree = ""; }; 84DEE8752B69AD6400A7BC17 /* SentryLaunchProfiling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryLaunchProfiling.h; path = Sources/Sentry/include/SentryLaunchProfiling.h; sourceTree = SOURCE_ROOT; }; 84E13B832CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackWidgetButtonMegaphoneIconView.swift; sourceTree = ""; }; @@ -3515,9 +3515,9 @@ isa = PBXGroup; children = ( 849B8F9E2C70091A00148E1F /* Configuration */, - 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegration.swift */, - 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h */, - 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m */, + 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift */, + 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h */, + 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m */, 84CFA4C92C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift */, 84BA62262CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift */, 84E13B832CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift */, @@ -3979,7 +3979,7 @@ 8E133FA625E72EB400ABD0BF /* SentrySamplingContext.h in Headers */, 0A9BF4E428A114B50068D266 /* SentryViewHierarchyIntegration.h in Headers */, D8BBD32728FD9FC00011F850 /* SentrySwift.h in Headers */, - 84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h in Headers */, + 84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h in Headers */, 8E4E7C7425DAAB49006AB9E2 /* SentrySpanProtocol.h in Headers */, 8EC4CF4A25C38DAA0093DEE9 /* SentrySpanStatus.h in Headers */, 8ECC673D25C23996000E2BF6 /* SentrySpanId.h in Headers */, @@ -4601,7 +4601,7 @@ 7B63459F280EBA7200CFA05A /* SentryUIEventTracker.m in Sources */, 7BF9EF782722B35D00B5BBEF /* SentrySubClassFinder.m in Sources */, D80CD8D32B751447002F710B /* SentryMXCallStackTree.swift in Sources */, - 84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m in Sources */, + 84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m in Sources */, 7BCFA71627D0BB50008C662C /* SentryANRTrackerV1.m in Sources */, 8459FCC02BD73EB20038E9C9 /* SentryProfilerSerialization.mm in Sources */, 621C884A2CAD23E9000EABCB /* SentryCaptureTransactionWithProfile.mm in Sources */, @@ -4724,7 +4724,7 @@ 849B8F9D2C6E906900148E1F /* SentryUserFeedbackWidgetConfiguration.swift in Sources */, 639FCFA51EBC809A00778193 /* SentryStacktrace.m in Sources */, D84D2CC32C29AD120011AF8A /* SentrySessionReplay.swift in Sources */, - 849B8F9B2C6E906900148E1F /* SentryUserFeedbackIntegration.swift in Sources */, + 849B8F9B2C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift in Sources */, 63FE70DF20DA4C1000CDBAE8 /* SentryCrashMonitorType.c in Sources */, 7BF9EF7E2722B91F00B5BBEF /* SentryDefaultObjCRuntimeWrapper.m in Sources */, 7BC3936E25B1AB72004F03D3 /* SentryLevelMapper.m in Sources */, diff --git a/Sources/Sentry/SentrySDK.m b/Sources/Sentry/SentrySDK.m index 83602c3e64..9a6048a773 100644 --- a/Sources/Sentry/SentrySDK.m +++ b/Sources/Sentry/SentrySDK.m @@ -24,7 +24,7 @@ #import "SentrySerialization.h" #import "SentrySwift.h" #import "SentryTransactionContext.h" -#import "SentryUserFeedbackIntegrationShell.h" +#import "SentryUserFeedbackIntegration.h" #if TARGET_OS_OSX # import "SentryCrashExceptionApplication.h" @@ -467,8 +467,7 @@ + (void)installIntegrations #if TARGET_OS_IOS && SENTRY_HAS_UIKIT if (@available(iOS 13.0, *)) { if (options.userFeedbackConfiguration != nil) { - [integrationNames - addObject:NSStringFromClass([SentryUserFeedbackIntegrationShell class])]; + [integrationNames addObject:NSStringFromClass([SentryUserFeedbackIntegration class])]; } } #endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT diff --git a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.m b/Sources/Sentry/SentryUserFeedbackIntegration.m similarity index 79% rename from Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.m rename to Sources/Sentry/SentryUserFeedbackIntegration.m index b001cc57b8..e8a18aa549 100644 --- a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.m +++ b/Sources/Sentry/SentryUserFeedbackIntegration.m @@ -1,10 +1,10 @@ -#import "SentryUserFeedbackIntegrationShell.h" +#import "SentryUserFeedbackIntegration.h" #import "SentryOptions+Private.h" #import "SentrySwift.h" #if TARGET_OS_IOS && SENTRY_HAS_UIKIT -@implementation SentryUserFeedbackIntegrationShell { +@implementation SentryUserFeedbackIntegration { SentryUserFeedbackIntegration *_driver; } diff --git a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.h b/Sources/Sentry/include/SentryUserFeedbackIntegration.h similarity index 76% rename from Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.h rename to Sources/Sentry/include/SentryUserFeedbackIntegration.h index d4062328c4..763201fcfd 100644 --- a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.h +++ b/Sources/Sentry/include/SentryUserFeedbackIntegration.h @@ -7,7 +7,7 @@ NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(13.0)) -@interface SentryUserFeedbackIntegrationShell : SentryBaseIntegration +@interface SentryUserFeedbackIntegration : SentryBaseIntegration @end diff --git a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegration.swift b/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationDriver.swift similarity index 98% rename from Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegration.swift rename to Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationDriver.swift index 562321811a..f9b3d7167c 100644 --- a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegration.swift +++ b/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationDriver.swift @@ -9,7 +9,7 @@ import UIKit */ @available(iOS 13.0, *) @objcMembers -class SentryUserFeedbackIntegration: NSObject { +class SentryUserFeedbackIntegrationDriver: NSObject { let configuration: SentryUserFeedbackConfiguration private var window: SentryUserFeedbackWidget.Window? From f359d1a7c13f30d8010f7387ecd8b1b7bc7e3dd1 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Wed, 30 Oct 2024 13:00:21 -0800 Subject: [PATCH 2/2] fixup! ref: move integration objc sources to correct location --- Sources/Sentry/SentryUserFeedbackIntegration.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Sentry/SentryUserFeedbackIntegration.m b/Sources/Sentry/SentryUserFeedbackIntegration.m index e8a18aa549..f51f08059a 100644 --- a/Sources/Sentry/SentryUserFeedbackIntegration.m +++ b/Sources/Sentry/SentryUserFeedbackIntegration.m @@ -5,12 +5,12 @@ #if TARGET_OS_IOS && SENTRY_HAS_UIKIT @implementation SentryUserFeedbackIntegration { - SentryUserFeedbackIntegration *_driver; + SentryUserFeedbackIntegrationDriver *_driver; } - (BOOL)installWithOptions:(SentryOptions *)options { - _driver = [[SentryUserFeedbackIntegration alloc] + _driver = [[SentryUserFeedbackIntegrationDriver alloc] initWithConfiguration:options.userFeedbackConfiguration]; return YES; }