Skip to content

Commit 3a17a75

Browse files
committed
Use explicit name
1 parent a542a22 commit 3a17a75

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HybridPublic/SentryIntegrationProtocol.h

Sources/Sentry/include/SentryPrivate.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#import "SentryEnvelopeAttachmentHeader.h"
2323
#import "SentryEventSwiftHelper.h"
2424
#import "SentryHub+Private.h"
25+
// In SPM the file needs to be in the "include" directory since that is
26+
// the Public headers directory, but in Cocoapods it must be in HybridPublic because it is used in
27+
// that public interface too. In order to handle both these cases the file is in HybridPublic but
28+
// symlinked to include.
2529
#import "SentryIntegrationProtocol.h"
2630
#import "SentryNSDataUtils.h"
2731
#import "SentrySDK+Private.h"

Sources/Swift/Core/Integrations/Integrations.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ protocol Integration: SentryBaseIntegrationProtocol {
99

1010
// The initializer is failable, return nil if the integration was not installed, for example when the options that enable the integration is not enabled.
1111
init?(with options: Options, dependencies: Dependencies)
12+
13+
// Name of the integration that is used by `SentrySdkInfo`
14+
static var name: String { get }
1215
}
1316

1417
// Type erases the `Integration` so that it can be stored in an array and used for `addInstalledIntegration`
@@ -17,7 +20,7 @@ private struct AnyIntegration {
1720
let name: String
1821

1922
init<I: Integration>(_ integration: I.Type) where I.Dependencies == SentryDependencyContainer {
20-
name = NSStringFromClass(I.self)
23+
name = I.name
2124
start = {
2225
integration.init(with: $0, dependencies: $1)
2326
}

Sources/Swift/Integrations/UserFeedback/UserFeedbackIntegration.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ final class UserFeedbackIntegration<Dependencies: ScreenshotSourceProvider>: NSO
2727
}
2828

2929
func uninstall() { }
30+
31+
static var name: String {
32+
"SentryUserFeedbackIntegration"
33+
}
3034
}
3135

3236
#endif

0 commit comments

Comments
 (0)