diff --git a/Samples/iOS-SwiftUI/iOS-SwiftUI.yml b/Samples/iOS-SwiftUI/iOS-SwiftUI.yml index 78d1d20caa0..d41c280d86a 100644 --- a/Samples/iOS-SwiftUI/iOS-SwiftUI.yml +++ b/Samples/iOS-SwiftUI/iOS-SwiftUI.yml @@ -31,7 +31,7 @@ targets: - ../../Sources/Sentry/Public/SentrySerializable.h - ../../Sources/Sentry/include/SentryTracer.h - ../../Sources/Sentry/include/SentryPerformanceTracker.h - - ../../Sources/Sentry/Public/SentryProfilingConditionals.h + - ../../Sources/Sentry/include/HybridPublic/SentryProfilingConditionals.h dependencies: - target: Sentry/Sentry - target: Sentry/SentrySwiftUI diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 8a0a4b6a8c0..992548ce316 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -10,7 +10,7 @@ 0354A22B2A134D9C003C3A04 /* SentryProfilerState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0354A22A2A134D9C003C3A04 /* SentryProfilerState.h */; }; 03BCC38A27E1BF49003232C7 /* SentryTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 03BCC38927E1BF49003232C7 /* SentryTime.h */; }; 03BCC38C27E1C01A003232C7 /* SentryTime.mm in Sources */ = {isa = PBXBuildFile; fileRef = 03BCC38B27E1C01A003232C7 /* SentryTime.mm */; }; - 03BCC38E27E2A377003232C7 /* SentryProfilingConditionals.h in Headers */ = {isa = PBXBuildFile; fileRef = 03BCC38D27E2A377003232C7 /* SentryProfilingConditionals.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03BCC38E27E2A377003232C7 /* SentryProfilingConditionals.h in Headers */ = {isa = PBXBuildFile; fileRef = 03BCC38D27E2A377003232C7 /* SentryProfilingConditionals.h */; settings = {ATTRIBUTES = (Private, ); }; }; 03F84D1E27DD414C008FE43F /* SentryBacktrace.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 03F84D1227DD414C008FE43F /* SentryBacktrace.hpp */; }; 03F84D2027DD414C008FE43F /* SentryStackBounds.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 03F84D1427DD414C008FE43F /* SentryStackBounds.hpp */; }; 03F84D2127DD414C008FE43F /* SentrySamplingProfiler.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 03F84D1527DD414C008FE43F /* SentrySamplingProfiler.hpp */; }; @@ -1286,7 +1286,7 @@ 035E73CD27D5790A005EEB11 /* SentryThreadMetadataCacheTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryThreadMetadataCacheTests.mm; sourceTree = ""; }; 03BCC38927E1BF49003232C7 /* SentryTime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryTime.h; path = Sources/Sentry/include/SentryTime.h; sourceTree = SOURCE_ROOT; }; 03BCC38B27E1C01A003232C7 /* SentryTime.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = SentryTime.mm; path = Sources/Sentry/SentryTime.mm; sourceTree = SOURCE_ROOT; }; - 03BCC38D27E2A377003232C7 /* SentryProfilingConditionals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryProfilingConditionals.h; path = ../Public/SentryProfilingConditionals.h; sourceTree = ""; }; + 03BCC38D27E2A377003232C7 /* SentryProfilingConditionals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryProfilingConditionals.h; path = ../include/HybridPublic/SentryProfilingConditionals.h; sourceTree = ""; }; 03F84D1227DD414C008FE43F /* SentryBacktrace.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = SentryBacktrace.hpp; path = Sources/Sentry/include/SentryBacktrace.hpp; sourceTree = SOURCE_ROOT; }; 03F84D1427DD414C008FE43F /* SentryStackBounds.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = SentryStackBounds.hpp; path = Sources/Sentry/include/SentryStackBounds.hpp; sourceTree = SOURCE_ROOT; }; 03F84D1527DD414C008FE43F /* SentrySamplingProfiler.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = SentrySamplingProfiler.hpp; path = Sources/Sentry/include/SentrySamplingProfiler.hpp; sourceTree = SOURCE_ROOT; }; diff --git a/Sources/Resources/Sentry.modulemap b/Sources/Resources/Sentry.modulemap index efa5571df5b..09d933928d8 100644 --- a/Sources/Resources/Sentry.modulemap +++ b/Sources/Resources/Sentry.modulemap @@ -6,6 +6,7 @@ framework module Sentry { explicit module _Hybrid { // Headers that are not part of the public API and should only be used by hybrid SDKs + header "SentryProfilingConditionals.h" header "PrivateSentrySDKOnly.h" header "PrivatesHeader.h" header "SentryAppStartMeasurement.h" diff --git a/Sources/Sentry/Public/Sentry.h b/Sources/Sentry/Public/Sentry.h index e4ff48c6a7e..88804050393 100644 --- a/Sources/Sentry/Public/Sentry.h +++ b/Sources/Sentry/Public/Sentry.h @@ -29,7 +29,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import -# import # import # import # import diff --git a/Sources/Sentry/Public/SentryWithoutUIKit.h b/Sources/Sentry/Public/SentryWithoutUIKit.h index b6fd9545801..8aaea648193 100644 --- a/Sources/Sentry/Public/SentryWithoutUIKit.h +++ b/Sources/Sentry/Public/SentryWithoutUIKit.h @@ -29,7 +29,6 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[]; # import # import # import -# import # import # import # import diff --git a/Sources/Sentry/Public/SentryProfilingConditionals.h b/Sources/Sentry/include/HybridPublic/SentryProfilingConditionals.h similarity index 100% rename from Sources/Sentry/Public/SentryProfilingConditionals.h rename to Sources/Sentry/include/HybridPublic/SentryProfilingConditionals.h diff --git a/Sources/Sentry/include/SentryPrivate.h b/Sources/Sentry/include/SentryPrivate.h index cf98fe32c80..ac3459a9253 100644 --- a/Sources/Sentry/include/SentryPrivate.h +++ b/Sources/Sentry/include/SentryPrivate.h @@ -1,3 +1,9 @@ +// This import must be first. In SPM the file needs to be in the "include" directory since that is +// the Public headers directory, but in Cocoapods it must be in HybridPublic because it is used in +// that public interface too. In order to handle both these cases the file is in HybridPublic but +// symlinked to include. +#import "SentryProfilingConditionals.h" + // Sentry internal headers that are needed for swift code; you cannot import headers that depend on // public interfaces here #import "NSLocale+Sentry.h" diff --git a/Sources/Sentry/include/SentryProfilingConditionals.h b/Sources/Sentry/include/SentryProfilingConditionals.h new file mode 120000 index 00000000000..dc3e6495538 --- /dev/null +++ b/Sources/Sentry/include/SentryProfilingConditionals.h @@ -0,0 +1 @@ +HybridPublic/SentryProfilingConditionals.h \ No newline at end of file diff --git a/sdk_api.json b/sdk_api.json index 4428decede4..ac813a2d3ad 100644 --- a/sdk_api.json +++ b/sdk_api.json @@ -234,16 +234,6 @@ "Exported" ] }, - { - "kind": "Import", - "name": "Sentry.SentryProfilingConditionals", - "printedName": "Sentry.SentryProfilingConditionals", - "declKind": "Import", - "moduleName": "Sentry", - "declAttributes": [ - "Exported" - ] - }, { "kind": "Import", "name": "Sentry.SentryReplayApi", @@ -57119,48 +57109,6 @@ } ] }, - { - "kind": "Var", - "name": "SENTRY_TARGET_PROFILING_SUPPORTED", - "printedName": "SENTRY_TARGET_PROFILING_SUPPORTED", - "children": [ - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - } - ], - "declKind": "Var", - "usr": "c:@macro@SENTRY_TARGET_PROFILING_SUPPORTED", - "moduleName": "Sentry", - "declAttributes": [ - "Nonisolated" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - } - ], - "declKind": "Accessor", - "usr": "s:SC33SENTRY_TARGET_PROFILING_SUPPORTEDs5Int32Vvg", - "mangledName": "$sSC33SENTRY_TARGET_PROFILING_SUPPORTEDs5Int32Vvg", - "moduleName": "Sentry", - "declAttributes": [ - "Transparent" - ], - "accessorKind": "get" - } - ] - }, { "kind": "Var", "name": "SENTRY_TARGET_REPLAY_SUPPORTED",