Skip to content

Commit 91e9878

Browse files
committed
ref: Use Swift integrations
1 parent df7a9be commit 91e9878

15 files changed

+103
-177
lines changed

Sentry.xcodeproj/project.pbxproj

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,6 @@
605605
845C16D52A622A5B00EC9519 /* SentryTracer+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 845C16D42A622A5B00EC9519 /* SentryTracer+Private.h */; };
606606
845CEAEF2D83F79500B6B325 /* SentryProfilingPublicAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 845CEAEE2D83F79500B6B325 /* SentryProfilingPublicAPITests.swift */; };
607607
845CEB172D8A979700B6B325 /* SentryAppStartProfilingConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 845CEB162D8A979700B6B325 /* SentryAppStartProfilingConfigurationTests.swift */; };
608-
8482FA9B2DD7C397000E9283 /* SentryFeedbackAPIHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 8482FA992DD7C397000E9283 /* SentryFeedbackAPIHelper.h */; };
609-
8482FA9C2DD7C397000E9283 /* SentryFeedbackAPIHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8482FA9A2DD7C397000E9283 /* SentryFeedbackAPIHelper.m */; };
610608
848A45192BBF8D33006AAAEC /* SentryContinuousProfiler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 848A45182BBF8D33006AAAEC /* SentryContinuousProfiler.mm */; };
611609
848A451A2BBF8D33006AAAEC /* SentryContinuousProfiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 848A45172BBF8D33006AAAEC /* SentryContinuousProfiler.h */; };
612610
848A451D2BBF9504006AAAEC /* SentryProfilerTestHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 848A451C2BBF9504006AAAEC /* SentryProfilerTestHelpers.m */; };
@@ -650,8 +648,6 @@
650648
84B7FA4629B2935F00AD93B1 /* ClearTestState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD47B4C268F0B080076A663 /* ClearTestState.swift */; };
651649
84BA62272CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA62262CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift */; };
652650
84CFA4CA2C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84CFA4C92C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift */; };
653-
84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m */; };
654-
84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h */; };
655651
84DBC62C2CE82F12000C4904 /* SentryFeedback.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84DBC62B2CE82F0E000C4904 /* SentryFeedback.swift */; };
656652
84DEE86B2B686BD400A7BC17 /* SentrySamplerDecision.h in Headers */ = {isa = PBXBuildFile; fileRef = 84DEE86A2B686BD400A7BC17 /* SentrySamplerDecision.h */; };
657653
84DEE8762B69AD6400A7BC17 /* SentryLaunchProfiling.h in Headers */ = {isa = PBXBuildFile; fileRef = 84DEE8752B69AD6400A7BC17 /* SentryLaunchProfiling.h */; };
@@ -1101,6 +1097,8 @@
11011097
FA8E58F12E0AD4270049F69D /* SentryDispatchQueueWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8E58F02E0AD4220049F69D /* SentryDispatchQueueWrapper.swift */; };
11021098
FA90FAA82E06614E008CAAE8 /* SentryExtraPackages.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA90FAA72E06614B008CAAE8 /* SentryExtraPackages.swift */; };
11031099
FA90FAFD2E070A3B008CAAE8 /* SentryURLRequestFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA90FAFC2E070A3B008CAAE8 /* SentryURLRequestFactory.swift */; };
1100+
FA914E592ECF968500C54BDD /* UserFeedbackIntegration.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA914E532ECF968000C54BDD /* UserFeedbackIntegration.swift */; };
1101+
FA914E5B2ECF988900C54BDD /* Integrations.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA914E5A2ECF988700C54BDD /* Integrations.swift */; };
11041102
FA914E6D2ECFD7D800C54BDD /* SentryFeedbackAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA914E6C2ECFD7D800C54BDD /* SentryFeedbackAPI.swift */; };
11051103
FA94E6912E6B92C100576666 /* SentryClientReport.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA94E68B2E6B92BE00576666 /* SentryClientReport.swift */; };
11061104
FA94E6B22E6D265800576666 /* SentryEnvelope.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA94E6B12E6D265500576666 /* SentryEnvelope.swift */; };
@@ -1964,8 +1962,6 @@
19641962
846F90332D56F59D009E86C1 /* Brewfile-ci-deploy */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = "Brewfile-ci-deploy"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
19651963
848214B42E32B10900DF6998 /* SwiftUITestSample_Crash.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = SwiftUITestSample_Crash.xctestplan; sourceTree = "<group>"; };
19661964
848214B52E32B10900DF6998 /* SwiftUITestSample_Envelope.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = SwiftUITestSample_Envelope.xctestplan; sourceTree = "<group>"; };
1967-
8482FA992DD7C397000E9283 /* SentryFeedbackAPIHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryFeedbackAPIHelper.h; path = ../../../Sentry/include/SentryFeedbackAPIHelper.h; sourceTree = "<group>"; };
1968-
8482FA9A2DD7C397000E9283 /* SentryFeedbackAPIHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SentryFeedbackAPIHelper.m; path = ../../../Sentry/SentryFeedbackAPIHelper.m; sourceTree = "<group>"; };
19691965
848A45172BBF8D33006AAAEC /* SentryContinuousProfiler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryContinuousProfiler.h; path = ../include/SentryContinuousProfiler.h; sourceTree = "<group>"; };
19701966
848A45182BBF8D33006AAAEC /* SentryContinuousProfiler.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryContinuousProfiler.mm; sourceTree = "<group>"; };
19711967
848A451B2BBF9504006AAAEC /* SentryProfilerTestHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryProfilerTestHelpers.h; path = ../include/SentryProfilerTestHelpers.h; sourceTree = "<group>"; };
@@ -2005,8 +2001,6 @@
20052001
84BA62262CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackWidgetButtonView.swift; sourceTree = "<group>"; };
20062002
84C47B2B2A09239100DAEB8A /* .codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .codecov.yml; sourceTree = "<group>"; };
20072003
84CFA4C92C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackWidget.swift; sourceTree = "<group>"; };
2008-
84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryUserFeedbackIntegration.h; path = ../../../Sentry/include/SentryUserFeedbackIntegration.h; sourceTree = "<group>"; };
2009-
84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SentryUserFeedbackIntegration.m; path = ../../../Sentry/SentryUserFeedbackIntegration.m; sourceTree = "<group>"; };
20102004
84DBC62B2CE82F0E000C4904 /* SentryFeedback.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFeedback.swift; sourceTree = "<group>"; };
20112005
84DEE86A2B686BD400A7BC17 /* SentrySamplerDecision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentrySamplerDecision.h; path = include/SentrySamplerDecision.h; sourceTree = "<group>"; };
20122006
84DEE8752B69AD6400A7BC17 /* SentryLaunchProfiling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryLaunchProfiling.h; path = Sources/Sentry/include/SentryLaunchProfiling.h; sourceTree = SOURCE_ROOT; };
@@ -2484,6 +2478,8 @@
24842478
FA8E58F02E0AD4220049F69D /* SentryDispatchQueueWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryDispatchQueueWrapper.swift; sourceTree = "<group>"; };
24852479
FA90FAA72E06614B008CAAE8 /* SentryExtraPackages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryExtraPackages.swift; sourceTree = "<group>"; };
24862480
FA90FAFC2E070A3B008CAAE8 /* SentryURLRequestFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryURLRequestFactory.swift; sourceTree = "<group>"; };
2481+
FA914E532ECF968000C54BDD /* UserFeedbackIntegration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserFeedbackIntegration.swift; sourceTree = "<group>"; };
2482+
FA914E5A2ECF988700C54BDD /* Integrations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Integrations.swift; sourceTree = "<group>"; };
24872483
FA914E6C2ECFD7D800C54BDD /* SentryFeedbackAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFeedbackAPI.swift; sourceTree = "<group>"; };
24882484
FA94E68B2E6B92BE00576666 /* SentryClientReport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryClientReport.swift; sourceTree = "<group>"; };
24892485
FA94E6B12E6D265500576666 /* SentryEnvelope.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryEnvelope.swift; sourceTree = "<group>"; };
@@ -4099,12 +4095,9 @@
40994095
children = (
41004096
849B8F9E2C70091A00148E1F /* Configuration */,
41014097
849B8F962C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift */,
4102-
8482FA992DD7C397000E9283 /* SentryFeedbackAPIHelper.h */,
4103-
8482FA9A2DD7C397000E9283 /* SentryFeedbackAPIHelper.m */,
41044098
FA914E6C2ECFD7D800C54BDD /* SentryFeedbackAPI.swift */,
41054099
84DBC62B2CE82F0E000C4904 /* SentryFeedback.swift */,
4106-
84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h */,
4107-
84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m */,
4100+
FA914E532ECF968000C54BDD /* UserFeedbackIntegration.swift */,
41084101
84CFA4C92C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift */,
41094102
84B0DFF32CD2CF64007FB332 /* SentryUserFeedbackFormController.swift */,
41104103
84A903702D39F66F00690CE4 /* SentryUserFeedbackFormViewModel.swift */,
@@ -4992,6 +4985,7 @@
49924985
FA67DCD02DDBD4EA00896B02 /* ANR */,
49934986
FA67DCD22DDBD4EA00896B02 /* FramesTracking */,
49944987
FA67DCD62DDBD4EA00896B02 /* Performance */,
4988+
FA914E5A2ECF988700C54BDD /* Integrations.swift */,
49954989
);
49964990
path = Integrations;
49974991
sourceTree = "<group>";
@@ -5100,8 +5094,6 @@
51005094
8E133FA625E72EB400ABD0BF /* SentrySamplingContext.h in Headers */,
51015095
0A9BF4E428A114B50068D266 /* SentryViewHierarchyIntegration.h in Headers */,
51025096
D8BBD32728FD9FC00011F850 /* SentrySwift.h in Headers */,
5103-
84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h in Headers */,
5104-
8482FA9B2DD7C397000E9283 /* SentryFeedbackAPIHelper.h in Headers */,
51055097
8E4E7C7425DAAB49006AB9E2 /* SentrySpanProtocol.h in Headers */,
51065098
8EC4CF4A25C38DAA0093DEE9 /* SentrySpanStatus.h in Headers */,
51075099
8ECC673D25C23996000E2BF6 /* SentrySpanId.h in Headers */,
@@ -5758,6 +5750,7 @@
57585750
628094742D39584C00B3F18B /* SentryUserCodable.swift in Sources */,
57595751
631E6D341EBC679C00712345 /* SentryQueueableRequestManager.m in Sources */,
57605752
7B8713B426415BAA006D6004 /* SentryAppStartTracker.m in Sources */,
5753+
FA914E5B2ECF988900C54BDD /* Integrations.swift in Sources */,
57615754
7BDB03BB2513652900BAE198 /* _SentryDispatchQueueWrapperInternal.m in Sources */,
57625755
FA6FC0A32E0B5ACE00ED2669 /* SentrySdkPackage.swift in Sources */,
57635756
F48F78692E61DE28009D4E7D /* SentryReachability.swift in Sources */,
@@ -5823,7 +5816,6 @@
58235816
848A451D2BBF9504006AAAEC /* SentryProfilerTestHelpers.m in Sources */,
58245817
7B63459F280EBA7200CFA05A /* SentryUIEventTracker.m in Sources */,
58255818
7BF9EF782722B35D00B5BBEF /* SentrySubClassFinder.m in Sources */,
5826-
84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m in Sources */,
58275819
7BCFA71627D0BB50008C662C /* SentryANRTrackerV1.m in Sources */,
58285820
8459FCC02BD73EB20038E9C9 /* SentryProfilerSerialization.m in Sources */,
58295821
620078722D38F00D0022CB67 /* SentryGeoCodable.swift in Sources */,
@@ -5932,6 +5924,7 @@
59325924
6276350C2D59FACC00F7CEF6 /* SentryEventDecoder.swift in Sources */,
59335925
7B6C5EDC264E8DA80010D138 /* SentryFramesTrackingIntegration.m in Sources */,
59345926
F4FE9E082E6248E40014FED5 /* SentryCrashWrapper.swift in Sources */,
5927+
FA914E592ECF968500C54BDD /* UserFeedbackIntegration.swift in Sources */,
59355928
849B8F9A2C6E906900148E1F /* SentryUserFeedbackConfiguration.swift in Sources */,
59365929
63295AF71EF3C7DB002D4490 /* SentryNSDictionarySanitize.m in Sources */,
59375930
7B8ECBFC26498958005FE2EF /* SentryDefaultAppStateManager.m in Sources */,
@@ -6137,7 +6130,6 @@
61376130
FACEED132E3179A10007B4AC /* SentryOptionsInternal.m in Sources */,
61386131
FAAB95C02EA163590030A2DB /* SentryScopeObserver.swift in Sources */,
61396132
D48891D02E98F2E700212823 /* SentryInfoPlistError.swift in Sources */,
6140-
8482FA9C2DD7C397000E9283 /* SentryFeedbackAPIHelper.m in Sources */,
61416133
7BC9A20628F41781001E7C4C /* SentryMeasurementUnit.m in Sources */,
61426134
F429D3AA2E8562EF00DBF387 /* RateLimitParser.swift in Sources */,
61436135
F4E1E9812E8C2B150007B080 /* SentryDateUtil.swift in Sources */,

Sources/Sentry/SentryFeedbackAPIHelper.m

Lines changed: 0 additions & 35 deletions
This file was deleted.

Sources/Sentry/SentryHub.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,10 @@ - (BOOL)isIntegrationInstalled:(Class)integrationClass
630630
}
631631
}
632632

633-
- (nullable id<SentryIntegrationProtocol>)getInstalledIntegration:(Class)integrationClass
633+
- (nullable id)getInstalledIntegration:(Class)integrationClass
634634
{
635635
@synchronized(_integrationsLock) {
636-
for (id<SentryIntegrationProtocol> item in _installedIntegrations) {
636+
for (id item in _installedIntegrations) {
637637
if ([item isKindOfClass:integrationClass]) {
638638
return item;
639639
}
@@ -651,7 +651,7 @@ - (BOOL)hasIntegration:(NSString *)integrationName
651651
}
652652
}
653653

654-
- (void)addInstalledIntegration:(id<SentryIntegrationProtocol>)integration name:(NSString *)name
654+
- (void)addInstalledIntegration:(id)integration name:(NSString *)name
655655
{
656656
@synchronized(_integrationsLock) {
657657
[_installedIntegrations addObject:integration];

Sources/Sentry/SentrySDKInternal.m

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@
2626
#import "SentrySwiftAsyncIntegration.h"
2727
#import "SentryTransactionContext.h"
2828
#import "SentryUseNSExceptionCallstackWrapper.h"
29-
#import "SentryUserFeedbackIntegration.h"
3029

3130
#if SENTRY_HAS_UIKIT
3231
# import "SentryAppStartTrackingIntegration.h"
3332
# import "SentryFramesTrackingIntegration.h"
3433
# import "SentryPerformanceTrackingIntegration.h"
3534
# import "SentryScreenshotIntegration.h"
3635
# import "SentryUIEventTrackingIntegration.h"
37-
# import "SentryUserFeedbackIntegration.h"
3836
# import "SentryViewHierarchyIntegration.h"
3937
# import "SentryWatchdogTerminationTrackingIntegration.h"
4038
#endif // SENTRY_HAS_UIKIT
@@ -535,10 +533,6 @@ + (void)endSession
535533
[SentryFileIOTrackingIntegration class], [SentryNetworkTrackingIntegration class],
536534
[SentrySwiftAsyncIntegration class], nil];
537535

538-
#if TARGET_OS_IOS && SENTRY_HAS_UIKIT
539-
[defaultIntegrations addObject:[SentryUserFeedbackIntegration class]];
540-
#endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT
541-
542536
#if SENTRY_HAS_METRIC_KIT
543537
[defaultIntegrations addObject:[SentryMetricKitIntegration class]];
544538
#endif // SENTRY_HAS_METRIC_KIT
@@ -576,6 +570,7 @@ + (void)installIntegrations
576570
name:NSStringFromClass(integrationClass)];
577571
}
578572
}
573+
[SentryIntegrationInstaller installWith:options];
579574
}
580575

581576
+ (void)reportFullyDisplayed

Sources/Sentry/SentryUserFeedbackIntegration.m

Lines changed: 0 additions & 52 deletions
This file was deleted.

Sources/Sentry/include/SentryFeedbackAPIHelper.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

Sources/Sentry/include/SentryHub+Private.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
2727

2828
@property (nullable, nonatomic, strong) SentrySession *session;
2929

30-
@property (nonatomic, strong) NSMutableArray<id<SentryIntegrationProtocol>> *installedIntegrations;
30+
@property (nonatomic, strong) NSMutableArray<id> *installedIntegrations;
3131

3232
@property (nonatomic, readonly, strong) NSObject *_swiftLogger;
3333

@@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
3737
*/
3838
- (NSArray<NSString *> *)trimmedInstalledIntegrationNames;
3939

40-
- (void)addInstalledIntegration:(id<SentryIntegrationProtocol>)integration name:(NSString *)name;
40+
- (void)addInstalledIntegration:(id)integration name:(NSString *)name;
4141
- (void)removeAllIntegrations;
4242

4343
- (SentryClientInternal *_Nullable)client;
@@ -84,7 +84,7 @@ NS_ASSUME_NONNULL_BEGIN
8484

8585
- (void)registerSessionListener:(id<SentrySessionListener>)listener;
8686
- (void)unregisterSessionListener:(id<SentrySessionListener>)listener;
87-
- (nullable id<SentryIntegrationProtocol>)getInstalledIntegration:(Class)integrationClass;
87+
- (nullable id)getInstalledIntegration:(Class)integrationClass;
8888
- (NSSet<NSString *> *)installedIntegrationNames;
8989

9090
#if SENTRY_TARGET_REPLAY_SUPPORTED

Sources/Sentry/include/SentryPrivate.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#import "SentryDelayedFramesTracker.h"
4242
#import "SentryDependencyContainerSwiftHelper.h"
4343
#import "SentryDeviceContextKeys.h"
44-
#import "SentryFeedbackAPIHelper.h"
4544
#import "SentryFileIOTrackerHelper.h"
4645
#import "SentryFileManagerHelper.h"
4746
#import "SentryMeta.h"

Sources/Sentry/include/SentryUserFeedbackIntegration.h

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)