Skip to content

Commit 03485f2

Browse files
Revert "feat(SPM) Convert SentrySDK to Swift (getsentry#5683)"
This reverts commit c2982e7.
1 parent 7205ba2 commit 03485f2

22 files changed

+530
-3472
lines changed

Sentry.xcodeproj/project.pbxproj

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,10 @@
619619
7D082B8323C628790029866B /* SentryMeta.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D082B8023C628780029866B /* SentryMeta.m */; };
620620
7D0FCFB22379B915004DD83A /* SentryHub.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D0FCFB02379B915004DD83A /* SentryHub.h */; settings = {ATTRIBUTES = (Public, ); }; };
621621
7D427C62237B1D200046BAC8 /* SentrySDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D427C5F237B1D200046BAC8 /* SentrySDK.h */; settings = {ATTRIBUTES = (Public, ); }; };
622+
<<<<<<< HEAD
622623
7D5C441A237C2E1F00DAB0A3 /* SentrySDK.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5C4418237C2E1F00DAB0A3 /* SentrySDK.m */; };
624+
=======
625+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
623626
7D5C441C237C2E1F00DAB0A3 /* SentryHub.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5C4419237C2E1F00DAB0A3 /* SentryHub.m */; };
624627
7D65260E237F649E00113EA2 /* SentryScope.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D65260B237F649E00113EA2 /* SentryScope.m */; };
625628
7D7F0A5F23DF3D2C00A4629C /* SentryGlobalEventProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D7F0A5E23DF3D2C00A4629C /* SentryGlobalEventProcessor.h */; };
@@ -1049,6 +1052,13 @@
10491052
FA3734862E0F09320091EF24 /* SentryDependencyContainerSwiftHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = FA3734852E0F092F0091EF24 /* SentryDependencyContainerSwiftHelper.m */; };
10501053
FA3A42722E1C5F9B00A08C39 /* SentryNSNotificationCenterWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA3A42712E1C5F9B00A08C39 /* SentryNSNotificationCenterWrapper.swift */; };
10511054
FA4C32972DF7513F001D7B00 /* SentryExperimentalOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA4C32962DF7513F001D7B00 /* SentryExperimentalOptions.swift */; };
1055+
<<<<<<< HEAD
1056+
=======
1057+
FA6555142E30181B009917BC /* SentrySDKInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6555132E30181B009917BC /* SentrySDKInternal.h */; };
1058+
FA6555162E30182B009917BC /* SentrySDKInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = FA6555152E30182B009917BC /* SentrySDKInternal.m */; };
1059+
FA6555182E301833009917BC /* SentrySDKWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = FA6555172E301833009917BC /* SentrySDKWrapper.m */; };
1060+
FA65551A2E3018A3009917BC /* SentrySDKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA6555192E30189E009917BC /* SentrySDKTests.swift */; };
1061+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
10521062
FA67DCC12DDBD4C800896B02 /* SentrySDKLog+Configure.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCC02DDBD4C800896B02 /* SentrySDKLog+Configure.swift */; };
10531063
FA67DCF52DDBD4EA00896B02 /* SentryCurrentDateProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCCA2DDBD4EA00896B02 /* SentryCurrentDateProvider.swift */; };
10541064
FA67DCF62DDBD4EA00896B02 /* SentryViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA67DCE52DDBD4EA00896B02 /* SentryViewRenderer.swift */; };
@@ -1095,6 +1105,10 @@
10951105
FA90FAFD2E070A3B008CAAE8 /* SentryURLRequestFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA90FAFC2E070A3B008CAAE8 /* SentryURLRequestFactory.swift */; };
10961106
FAB359982E05D7E90083D5E3 /* SentryEventSwiftHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = FAB359972E05D7E90083D5E3 /* SentryEventSwiftHelper.h */; };
10971107
FAB3599A2E05D8080083D5E3 /* SentryEventSwiftHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = FAB359992E05D8080083D5E3 /* SentryEventSwiftHelper.m */; };
1108+
<<<<<<< HEAD
1109+
=======
1110+
FAB7BBA92E2577A6007301E1 /* SentryModels+Serializable.h in Headers */ = {isa = PBXBuildFile; fileRef = FAB7BBA82E2577A2007301E1 /* SentryModels+Serializable.h */; };
1111+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
10981112
FAC62B652E15A4100003909D /* SentrySDKThreadTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC62B642E15A40C0003909D /* SentrySDKThreadTests.swift */; };
10991113
<<<<<<< HEAD
11001114
=======
@@ -1848,7 +1862,10 @@
18481862
7D082B8023C628780029866B /* SentryMeta.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryMeta.m; sourceTree = "<group>"; };
18491863
7D0FCFB02379B915004DD83A /* SentryHub.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryHub.h; path = Public/SentryHub.h; sourceTree = "<group>"; };
18501864
7D427C5F237B1D200046BAC8 /* SentrySDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentrySDK.h; path = Public/SentrySDK.h; sourceTree = "<group>"; };
1865+
<<<<<<< HEAD
18511866
7D5C4418237C2E1F00DAB0A3 /* SentrySDK.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentrySDK.m; sourceTree = "<group>"; };
1867+
=======
1868+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
18521869
7D5C4419237C2E1F00DAB0A3 /* SentryHub.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryHub.m; sourceTree = "<group>"; };
18531870
7D65260B237F649E00113EA2 /* SentryScope.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryScope.m; sourceTree = "<group>"; };
18541871
7D7F0A5E23DF3D2C00A4629C /* SentryGlobalEventProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryGlobalEventProcessor.h; path = include/SentryGlobalEventProcessor.h; sourceTree = "<group>"; };
@@ -2341,6 +2358,13 @@
23412358
FA3734852E0F092F0091EF24 /* SentryDependencyContainerSwiftHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryDependencyContainerSwiftHelper.m; sourceTree = "<group>"; };
23422359
FA3A42712E1C5F9B00A08C39 /* SentryNSNotificationCenterWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryNSNotificationCenterWrapper.swift; sourceTree = "<group>"; };
23432360
FA4C32962DF7513F001D7B00 /* SentryExperimentalOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryExperimentalOptions.swift; sourceTree = "<group>"; };
2361+
<<<<<<< HEAD
2362+
=======
2363+
FA6555132E30181B009917BC /* SentrySDKInternal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentrySDKInternal.h; path = include/SentrySDKInternal.h; sourceTree = "<group>"; };
2364+
FA6555152E30182B009917BC /* SentrySDKInternal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySDKInternal.m; sourceTree = "<group>"; };
2365+
FA6555172E301833009917BC /* SentrySDKWrapper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySDKWrapper.m; sourceTree = "<group>"; };
2366+
FA6555192E30189E009917BC /* SentrySDKTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKTests.swift; sourceTree = "<group>"; };
2367+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
23442368
FA67DCC02DDBD4C800896B02 /* SentrySDKLog+Configure.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentrySDKLog+Configure.swift"; sourceTree = "<group>"; };
23452369
FA67DCC22DDBD4EA00896B02 /* Locks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Locks.swift; sourceTree = "<group>"; };
23462370
FA67DCC32DDBD4EA00896B02 /* NumberExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberExtensions.swift; sourceTree = "<group>"; };
@@ -2387,6 +2411,10 @@
23872411
FA90FAFC2E070A3B008CAAE8 /* SentryURLRequestFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryURLRequestFactory.swift; sourceTree = "<group>"; };
23882412
FAB359972E05D7E90083D5E3 /* SentryEventSwiftHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEventSwiftHelper.h; path = include/SentryEventSwiftHelper.h; sourceTree = "<group>"; };
23892413
FAB359992E05D8080083D5E3 /* SentryEventSwiftHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryEventSwiftHelper.m; sourceTree = "<group>"; };
2414+
<<<<<<< HEAD
2415+
=======
2416+
FAB7BBA82E2577A2007301E1 /* SentryModels+Serializable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryModels+Serializable.h"; path = "include/SentryModels+Serializable.h"; sourceTree = "<group>"; };
2417+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
23902418
FAC62B642E15A40C0003909D /* SentrySDKThreadTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKThreadTests.swift; sourceTree = "<group>"; };
23912419
<<<<<<< HEAD
23922420
=======
@@ -2528,6 +2556,10 @@
25282556
621D9F2D2B9B030E003D94DE /* Helper */ = {
25292557
isa = PBXGroup;
25302558
children = (
2559+
<<<<<<< HEAD
2560+
=======
2561+
FA3A42712E1C5F9B00A08C39 /* SentryNSNotificationCenterWrapper.swift */,
2562+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
25312563
FA6FC0A22E0B5AC800ED2669 /* SentrySdkPackage.swift */,
25322564
FA8E58F02E0AD4220049F69D /* SentryDispatchQueueWrapper.swift */,
25332565
84B0E0062CD963F9007FB332 /* SentryIconography.swift */,
@@ -3003,8 +3035,14 @@
30033035
63AA76941EB9C1C200D153DE /* SentryClient.h */,
30043036
63AA75ED1EB8B3C400D153DE /* SentryClient.m */,
30053037
7B85DC1C24EFAFCD007D01D2 /* SentryClient+Private.h */,
3038+
<<<<<<< HEAD
30063039
7D427C5F237B1D200046BAC8 /* SentrySDK.h */,
30073040
7D5C4418237C2E1F00DAB0A3 /* SentrySDK.m */,
3041+
=======
3042+
92EC54CD2E1EB54B00A10AC2 /* SentryClient+Logs.h */,
3043+
7D427C5F237B1D200046BAC8 /* SentrySDK.h */,
3044+
FA6555172E301833009917BC /* SentrySDKWrapper.m */,
3045+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
30083046
7B610D5E2512390E00B0B5D9 /* SentrySDK+Private.h */,
30093047
<<<<<<< HEAD
30103048
=======
@@ -5446,7 +5484,11 @@
54465484
<<<<<<< HEAD
54475485
=======
54485486
F458D1172E186DF20028273E /* SentryScopePersistentStore+Fingerprint.swift in Sources */,
5487+
<<<<<<< HEAD
54495488
>>>>>>> parent of 883dd8f2 (ref(SPM): Create SentrySDKInternal (#5674))
5489+
=======
5490+
FA6555182E301833009917BC /* SentrySDKWrapper.m in Sources */,
5491+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
54505492
D8CB7417294724CC00A5F964 /* SentryEnvelopeAttachmentHeader.m in Sources */,
54515493
D84793262788737D00BE8E99 /* SentryByteCountFormatter.m in Sources */,
54525494
63AA769E1EB9C57A00D153DE /* SentryError.mm in Sources */,

SentryTestUtils/TestClient.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,6 @@ public class TestClient: SentryClient {
125125
captureFeedbackInvocations.record((feedback, scope))
126126
}
127127

128-
public var captureSerializedFeedbackInvocations = Invocations<(String, Scope)>()
129-
public override func captureSerializedFeedback(_ serializedFeedback: [AnyHashable: Any], withEventId feedbackEventId: String, attachments: [Attachment], scope: Scope) {
130-
captureSerializedFeedbackInvocations.record((feedbackEventId, scope))
131-
}
132-
133128
public var captureEnvelopeInvocations = Invocations<SentryEnvelope>()
134129
public override func capture(_ envelope: SentryEnvelope) {
135130
captureEnvelopeInvocations.record(envelope)

Sources/Sentry/Public/Sentry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
3434
# import <Sentry/SentryOptions.h>
3535
# import <Sentry/SentryReplayApi.h>
3636
# import <Sentry/SentryRequest.h>
37+
# import <Sentry/SentrySDK.h>
3738
# import <Sentry/SentrySampleDecision.h>
3839
# import <Sentry/SentrySamplingContext.h>
3940
# import <Sentry/SentryScope.h>

Sources/Sentry/Public/SentrySDK.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,12 @@ SENTRY_NO_INIT
281281

282282
#if TARGET_OS_IOS && SENTRY_HAS_UIKIT
283283

284+
<<<<<<< HEAD
284285
@property (nonatomic, class, readonly) SentryFeedbackAPI *feedback;
286+
=======
287+
@property (nonatomic, class, readonly) SentryFeedbackAPI *feedback NS_EXTENSION_UNAVAILABLE(
288+
"Sentry User Feedback UI cannot be used from app extensions.");
289+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
285290

286291
#endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT
287292

Sources/Sentry/Public/SentryWithoutUIKit.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
3535
# import <SentryWithoutUIKit/SentryOptions.h>
3636
# import <SentryWithoutUIKit/SentryReplayApi.h>
3737
# import <SentryWithoutUIKit/SentryRequest.h>
38+
# import <SentryWithoutUIKit/SentrySDK.h>
3839
# import <SentryWithoutUIKit/SentrySampleDecision.h>
3940
# import <SentryWithoutUIKit/SentrySamplingContext.h>
4041
# import <SentryWithoutUIKit/SentryScope.h>

Sources/Sentry/SentryClient.m

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -596,27 +596,18 @@ - (void)captureUserFeedback:(SentryUserFeedback *)userFeedback
596596
}
597597

598598
- (void)captureFeedback:(SentryFeedback *)feedback withScope:(SentryScope *)scope
599-
{
600-
[self captureSerializedFeedback:[feedback serialize]
601-
withEventId:feedback.eventId.sentryIdString
602-
attachments:[feedback attachmentsForEnvelope]
603-
scope:scope];
604-
}
605-
606-
- (void)captureSerializedFeedback:(NSDictionary *)serializedFeedback
607-
withEventId:(NSString *)feedbackEventId
608-
attachments:(NSArray<SentryAttachment *> *)feedbackAttachments
609-
scope:(SentryScope *)scope
610599
{
611600
if ([self isDisabled]) {
612601
[self logDisabledMessage];
613602
return;
614603
}
615604

616605
SentryEvent *feedbackEvent = [[SentryEvent alloc] init];
617-
feedbackEvent.eventId = [[SentryId alloc] initWithUUIDString:feedbackEventId];
606+
feedbackEvent.eventId = feedback.eventId;
618607
feedbackEvent.type = SentryEnvelopeItemTypeFeedback;
619608

609+
NSDictionary *serializedFeedback = [feedback serialize];
610+
620611
NSUInteger optionalItems = (scope.span == nil ? 0 : 1) + (scope.replayId == nil ? 0 : 1);
621612
NSMutableDictionary *context = [NSMutableDictionary dictionaryWithCapacity:1 + optionalItems];
622613
context[@"feedback"] = serializedFeedback;
@@ -635,7 +626,7 @@ - (void)captureSerializedFeedback:(NSDictionary *)serializedFeedback
635626
SentryTraceContext *traceContext = [self getTraceStateWithEvent:preparedEvent withScope:scope];
636627
NSArray<SentryAttachment *> *attachments = [[self processAttachmentsForEvent:preparedEvent
637628
attachments:scope.attachments]
638-
arrayByAddingObjectsFromArray:feedbackAttachments];
629+
arrayByAddingObjectsFromArray:[feedback attachmentsForEnvelope]];
639630

640631
[self.transportAdapter sendEvent:preparedEvent
641632
traceContext:traceContext

Sources/Sentry/SentryDependencyContainer.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ - (instancetype)init
164164
if (self = [super init]) {
165165
isInitialializingDependencyContainer = YES;
166166

167-
_dispatchQueueWrapper = SentryDependencies.dispatchQueueWrapper;
167+
_dispatchQueueWrapper = [[SentryDispatchQueueWrapper alloc] init];
168168
_random = [[SentryRandom alloc] init];
169169
_threadWrapper = [[SentryThreadWrapper alloc] init];
170170
_binaryImageCache = [[SentryBinaryImageCache alloc] init];
171-
_dateProvider = SentryDependencies.dateProvider;
171+
_dateProvider = [[SentryDefaultCurrentDateProvider alloc] init];
172172

173173
_notificationCenterWrapper = [[SentryNSNotificationCenterWrapper alloc] init];
174174
#if SENTRY_HAS_UIKIT

Sources/Sentry/SentryDependencyContainerSwiftHelper.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#import "SentryDependencyContainerSwiftHelper.h"
22
#import "SentryDependencyContainer.h"
3-
#import "SentrySDK+Private.h"
43
#import "SentrySwift.h"
54
#import "SentryUIApplication.h"
65

@@ -20,4 +19,12 @@ + (void)dispatchSyncOnMainQueue:(void (^)(void))block
2019
[SentryDependencyContainer.sharedInstance.dispatchQueueWrapper dispatchSyncOnMainQueue:block];
2120
}
2221

22+
<<<<<<< HEAD
23+
=======
24+
+ (id<SentryObjCRuntimeWrapper>)objcRuntimeWrapper
25+
{
26+
return SentryDependencyContainer.sharedInstance.objcRuntimeWrapper;
27+
}
28+
29+
>>>>>>> parent of c2982e7e (feat(SPM) Convert SentrySDK to Swift (#5683))
2330
@end

Sources/Sentry/SentryHub.m

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -557,19 +557,6 @@ - (void)captureFeedback:(SentryFeedback *)feedback
557557
}
558558
}
559559

560-
- (void)captureSerializedFeedback:(NSDictionary *)serializedFeedback
561-
withEventId:(NSString *)feedbackEventId
562-
attachments:(NSArray<SentryAttachment *> *)feedbackAttachments
563-
{
564-
SentryClient *client = self.client;
565-
if (client != nil) {
566-
[client captureSerializedFeedback:serializedFeedback
567-
withEventId:feedbackEventId
568-
attachments:feedbackAttachments
569-
scope:self.scope];
570-
}
571-
}
572-
573560
- (void)addBreadcrumb:(SentryBreadcrumb *)crumb
574561
{
575562
SentryOptions *options = [[self client] options];

0 commit comments

Comments
 (0)