From 6470b59984deb68efe6e8e1ae68e465ef7f82008 Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Thu, 5 Jan 2023 13:12:04 +0100 Subject: [PATCH] Fix compilation error --- Sentry.xcodeproj/project.pbxproj | 10 +++++++--- .../include/HybridPublic/PrivateSentrySDKOnly.h | 12 ------------ .../include/HybridPublic/SentryOptions+HybridSDKs.h | 13 +++++++++++++ Tests/SentryTests/Networking/SentryDsnTests.m | 2 +- Tests/SentryTests/SentryOptionsTest.m | 2 +- Tests/SentryTests/SentryTests-Bridging-Header.h | 1 + Tests/SentryTests/SentryTests.m | 5 ++--- 7 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 Sources/Sentry/include/HybridPublic/SentryOptions+HybridSDKs.h diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index ca085a72d36..5c064fd0e3e 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -313,6 +313,7 @@ 7B2A70DB27D607CF008B0D15 /* SentryThreadWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2A70DA27D607CF008B0D15 /* SentryThreadWrapper.h */; }; 7B2A70DD27D6083D008B0D15 /* SentryThreadWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B2A70DC27D6083D008B0D15 /* SentryThreadWrapper.m */; }; 7B2A70DF27D60904008B0D15 /* SentryTestThreadWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B2A70DE27D60904008B0D15 /* SentryTestThreadWrapper.swift */; }; + 7B2BB0032966F55900A1E102 /* SentryOptions+HybridSDKs.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2BB0012966F55900A1E102 /* SentryOptions+HybridSDKs.h */; }; 7B30B67C26527886006B2752 /* SentryDisplayLinkWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B30B67B26527886006B2752 /* SentryDisplayLinkWrapper.h */; }; 7B30B67E26527894006B2752 /* SentryDisplayLinkWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B30B67D26527894006B2752 /* SentryDisplayLinkWrapper.m */; }; 7B30B68026527C3C006B2752 /* SentryFramesTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B30B67F26527C3C006B2752 /* SentryFramesTrackerTests.swift */; }; @@ -1095,6 +1096,7 @@ 7B2A70DA27D607CF008B0D15 /* SentryThreadWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryThreadWrapper.h; path = include/SentryThreadWrapper.h; sourceTree = ""; }; 7B2A70DC27D6083D008B0D15 /* SentryThreadWrapper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryThreadWrapper.m; sourceTree = ""; }; 7B2A70DE27D60904008B0D15 /* SentryTestThreadWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryTestThreadWrapper.swift; sourceTree = ""; }; + 7B2BB0012966F55900A1E102 /* SentryOptions+HybridSDKs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryOptions+HybridSDKs.h"; path = "include/HybridPublic/SentryOptions+HybridSDKs.h"; sourceTree = ""; }; 7B30B67B26527886006B2752 /* SentryDisplayLinkWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryDisplayLinkWrapper.h; path = include/SentryDisplayLinkWrapper.h; sourceTree = ""; }; 7B30B67D26527894006B2752 /* SentryDisplayLinkWrapper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SentryDisplayLinkWrapper.m; path = include/SentryDisplayLinkWrapper.m; sourceTree = ""; }; 7B30B67F26527C3C006B2752 /* SentryFramesTrackerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFramesTrackerTests.swift; sourceTree = ""; }; @@ -1578,13 +1580,13 @@ D8BD2E67293619F600D96C6A /* PrivatesHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PrivatesHeader.h; path = include/HybridPublic/PrivatesHeader.h; sourceTree = ""; }; D8C67E9928000E23007E326E /* SentryUIApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryUIApplication.h; path = include/SentryUIApplication.h; sourceTree = ""; }; D8C67E9A28000E23007E326E /* SentryScreenshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryScreenshot.h; path = include/SentryScreenshot.h; sourceTree = ""; }; - D8CB742A294B1DD000A5F964 /* SentryUIApplicationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIApplicationTests.swift; sourceTree = ""; }; - D8CB742C294B294B00A5F964 /* MockUIScene.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MockUIScene.h; sourceTree = ""; }; - D8CB742D294B294B00A5F964 /* MockUIScene.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MockUIScene.m; sourceTree = ""; }; D8CB74142947246600A5F964 /* SentryEnvelopeAttachmentHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEnvelopeAttachmentHeader.h; path = include/SentryEnvelopeAttachmentHeader.h; sourceTree = ""; }; D8CB7416294724CC00A5F964 /* SentryEnvelopeAttachmentHeader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryEnvelopeAttachmentHeader.m; sourceTree = ""; }; D8CB74182947285A00A5F964 /* SentryEnvelopeItemHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEnvelopeItemHeader.h; path = Public/SentryEnvelopeItemHeader.h; sourceTree = ""; }; D8CB741A2947286500A5F964 /* SentryEnvelopeItemHeader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryEnvelopeItemHeader.m; sourceTree = ""; }; + D8CB742A294B1DD000A5F964 /* SentryUIApplicationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIApplicationTests.swift; sourceTree = ""; }; + D8CB742C294B294B00A5F964 /* MockUIScene.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MockUIScene.h; sourceTree = ""; }; + D8CB742D294B294B00A5F964 /* MockUIScene.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MockUIScene.m; sourceTree = ""; }; D8CE69BB277E39C700C6EC5C /* SentryFileIOTrackingIntegrationObjCTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryFileIOTrackingIntegrationObjCTests.m; sourceTree = ""; }; D8F6A2452885512100320515 /* SentryPredicateDescriptor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryPredicateDescriptor.m; sourceTree = ""; }; D8F6A24A2885515B00320515 /* SentryPredicateDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryPredicateDescriptor.h; path = include/SentryPredicateDescriptor.h; sourceTree = ""; }; @@ -2089,6 +2091,7 @@ 63EED6BC2237923600E02400 /* SentryOptions.h */, 63EED6BD2237923600E02400 /* SentryOptions.m */, 7BDEAA002632A4580001EA25 /* SentryOptions+Private.h */, + 7B2BB0012966F55900A1E102 /* SentryOptions+HybridSDKs.h */, 7D9B079F23D1E89800C5FC8E /* SentryMeta.h */, 7D082B8023C628780029866B /* SentryMeta.m */, ); @@ -3257,6 +3260,7 @@ 7B85DC1E24EFAFCD007D01D2 /* SentryClient+Private.h in Headers */, A8AFFCCF2906C03700967CD7 /* SentryRequest.h in Headers */, 7BD4BD4327EB29BA0071F4FF /* SentryClientReport.h in Headers */, + 7B2BB0032966F55900A1E102 /* SentryOptions+HybridSDKs.h in Headers */, 7BF9EF762722B34700B5BBEF /* SentrySubClassFinder.h in Headers */, 7BC852332458802C005A70F0 /* SentryDataCategoryMapper.h in Headers */, 7BDB03B7251364F800BAE198 /* SentryDispatchQueueWrapper.h in Headers */, diff --git a/Sources/Sentry/include/HybridPublic/PrivateSentrySDKOnly.h b/Sources/Sentry/include/HybridPublic/PrivateSentrySDKOnly.h index b028098e28a..c09e5d000a9 100644 --- a/Sources/Sentry/include/HybridPublic/PrivateSentrySDKOnly.h +++ b/Sources/Sentry/include/HybridPublic/PrivateSentrySDKOnly.h @@ -1,7 +1,6 @@ #import "PrivatesHeader.h" #import "SentryAppStartMeasurement.h" #import "SentryEnvelopeItemType.h" -#import "SentryOptions.h" #import "SentryScreenFrames.h" @class SentryEnvelope, SentryDebugMeta, SentryAppStartMeasurement, SentryScreenFrames, @@ -100,15 +99,4 @@ typedef void (^SentryOnAppStartMeasurementAvailable)( @end -@interface -SentryOptions (HybridSDKs) - -/** - * Init SentryOptions with a dictionary. Needed by hybrid SDKs. - */ -- (_Nullable instancetype)initWithDict:(NSDictionary *)options - didFailWithError:(NSError *_Nullable *_Nullable)error; - -@end - NS_ASSUME_NONNULL_END diff --git a/Sources/Sentry/include/HybridPublic/SentryOptions+HybridSDKs.h b/Sources/Sentry/include/HybridPublic/SentryOptions+HybridSDKs.h new file mode 100644 index 00000000000..104d8e2484d --- /dev/null +++ b/Sources/Sentry/include/HybridPublic/SentryOptions+HybridSDKs.h @@ -0,0 +1,13 @@ +#import "SentryOptions.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface +SentryOptions (HybridSDKs) + +- (_Nullable instancetype)initWithDict:(NSDictionary *)options + didFailWithError:(NSError *_Nullable *_Nullable)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Tests/SentryTests/Networking/SentryDsnTests.m b/Tests/SentryTests/Networking/SentryDsnTests.m index 43597954668..bd939729dde 100644 --- a/Tests/SentryTests/Networking/SentryDsnTests.m +++ b/Tests/SentryTests/Networking/SentryDsnTests.m @@ -1,8 +1,8 @@ -#import "PrivateSentrySDKOnly.h" #import "SentryDsn.h" #import "SentryError.h" #import "SentryMeta.h" #import "SentryNSURLRequest.h" +#import "SentryOptions+HybridSDKs.h" #import #import diff --git a/Tests/SentryTests/SentryOptionsTest.m b/Tests/SentryTests/SentryOptionsTest.m index 4707be10092..62db1e32b5c 100644 --- a/Tests/SentryTests/SentryOptionsTest.m +++ b/Tests/SentryTests/SentryOptionsTest.m @@ -1,6 +1,6 @@ #import "SentryOptions.h" -#import "PrivateSentrySDKOnly.h" #import "SentryError.h" +#import "SentryOptions+HybridSDKs.h" #import "SentrySDK.h" #import "SentryTests-Swift.h" #import diff --git a/Tests/SentryTests/SentryTests-Bridging-Header.h b/Tests/SentryTests/SentryTests-Bridging-Header.h index 1e0d45a5a9d..afde74737f8 100644 --- a/Tests/SentryTests/SentryTests-Bridging-Header.h +++ b/Tests/SentryTests/SentryTests-Bridging-Header.h @@ -111,6 +111,7 @@ #import "SentryNetworkTrackingIntegration.h" #import "SentryNoOpSpan.h" #import "SentryObjCRuntimeWrapper.h" +#import "SentryOptions+HybridSDKs.h" #import "SentryOptions+Private.h" #import "SentryPerformanceTracker.h" #import "SentryPerformanceTrackingIntegration.h" diff --git a/Tests/SentryTests/SentryTests.m b/Tests/SentryTests/SentryTests.m index 69452ab8f46..280fedd8228 100644 --- a/Tests/SentryTests/SentryTests.m +++ b/Tests/SentryTests/SentryTests.m @@ -1,15 +1,14 @@ #import "NSDate+SentryExtras.h" -#import "PrivateSentrySDKOnly.h" #import "SentryBreadcrumbTracker.h" +#import "SentryDataCategory.h" #import "SentryLevelMapper.h" #import "SentryMessage.h" #import "SentryMeta.h" +#import "SentryOptions+HybridSDKs.h" #import "SentrySDK+Private.h" #import #import -#import "SentryDataCategory.h" - @interface SentryBreadcrumbTracker (Private)