From 81845cc5e28ea838198ad0c738c40e3cb8d27d9d Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Mon, 18 May 2026 16:39:47 +0200 Subject: [PATCH] fix(ios): use framework-style import for SentrySwizzle.h The quote-style `#import "SentrySwizzle.h"` only resolves when sentry-cocoa is consumed via CocoaPods source build, where the header sits on the HEADER_SEARCH_PATHS. When sentry-cocoa is consumed as a pre-built xcframework (via SPM `binaryTarget` or manual drop-in), the header lives in the framework's `PrivateHeaders/` directory and the quote-style import fails: error: 'SentrySwizzle.h' file not found Apple's framework header lookup considers both `Headers/` and `PrivateHeaders/` when using framework-style imports, so `` resolves correctly in both distribution modes. This is a no-regression change: the CocoaPods source build continues to work, verified by building RNSentry against sentry-cocoa 9.13.0 (`pod install` + `xcodebuild`). It also unblocks one of the two issues found during the SPM consumption spike at getsentry/sentry-react-native#6170. --- packages/core/ios/RNSentryRNSScreen.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/ios/RNSentryRNSScreen.m b/packages/core/ios/RNSentryRNSScreen.m index d29a3035eb..90b2e733d3 100644 --- a/packages/core/ios/RNSentryRNSScreen.m +++ b/packages/core/ios/RNSentryRNSScreen.m @@ -4,7 +4,7 @@ # import "RNSentryDependencyContainer.h" # import "RNSentryFramesTrackerListener.h" -# import "SentrySwizzle.h" +# import @import Sentry; @implementation RNSentryRNSScreen