Skip to content

Commit 3c1fc9d

Browse files
antonisclaude
andcommitted
fix(ios): Declare private initializers inline instead of importing private headers
Private headers (SentryBreadcrumb+Private.h, SentryUser+Private.h) are not available in dynamic framework builds. Declare the category methods inline to avoid the header-not-found error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 73f4db2 commit 3c1fc9d

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

packages/core/ios/RNSentry.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@
2525
#import <Sentry/SentryEvent.h>
2626
#import <Sentry/SentryException.h>
2727
#import <Sentry/SentryGeo.h>
28-
#import <Sentry/SentryUser+Private.h>
2928
#import <Sentry/SentryUser.h>
3029

30+
@interface SentryUser ()
31+
- (instancetype)initWithDictionary:(NSDictionary *)dictionary;
32+
@end
33+
3134
// This guard prevents importing Hermes in JSC apps
3235
#if SENTRY_PROFILING_ENABLED
3336
# import <hermes/hermes.h>

packages/core/ios/RNSentryBreadcrumb.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#import "RNSentryBreadcrumb.h"
22
@import Sentry;
3-
#import <Sentry/SentryBreadcrumb+Private.h>
3+
4+
@interface SentryBreadcrumb ()
5+
- (instancetype _Nonnull)initWithDictionary:(NSDictionary *_Nonnull)dictionary;
6+
@end
47

58
@implementation RNSentryBreadcrumb
69

0 commit comments

Comments
 (0)