Skip to content

Commit ccb6331

Browse files
committed
fix: module access
1 parent d5c8e67 commit ccb6331

File tree

4 files changed

+36
-18
lines changed

4 files changed

+36
-18
lines changed

RNSentry.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ is_new_arch_enabled = ENV["RCT_NEW_ARCH_ENABLED"] == "1"
1414
is_using_hermes = (ENV['USE_HERMES'] == nil && is_hermes_default) || ENV['USE_HERMES'] == '1'
1515
new_arch_enabled_flag = (is_new_arch_enabled ? folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED" : "")
1616
sentry_profiling_supported_flag = (is_profiling_supported ? " -DSENTRY_PROFILING_SUPPORTED=1" : "")
17-
other_cflags = "$(inherited) -fcxx-modules -fmodules" + new_arch_enabled_flag + sentry_profiling_supported_flag
17+
other_cflags = "$(inherited)" + new_arch_enabled_flag + sentry_profiling_supported_flag
1818

1919
Pod::Spec.new do |s|
2020
s.name = 'RNSentry'
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
3333
s.preserve_paths = '*.js'
3434

3535
s.dependency 'React-Core'
36-
s.dependency 'Sentry/HybridSDK', '8.27.0'
36+
s.dependency 'Sentry/HybridSDK'
3737

3838
s.source_files = 'ios/**/*.{h,m,mm}'
3939
s.public_header_files = 'ios/RNSentry.h'

ios/RNSentry.mm

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#import "RNSentryEvents.h"
3838
#import "RNSentryDependencyContainer.h"
39-
#import "RNSentryBreadcrumbConverter.h"
39+
#import "RNSentrySessionReplay.h"
4040

4141
#if SENTRY_HAS_UIKIT
4242
#import "RNSentryRNSScreen.h"
@@ -91,8 +91,7 @@ + (BOOL)requiresMainQueueSetup {
9191

9292
[SentrySDK startWithOptions:sentryOptions];
9393

94-
RNSentryBreadcrumbConverter* breadcrumbConverter = [[RNSentryBreadcrumbConverter alloc] init];
95-
[PrivateSentrySDKOnly configureSessionReplayWith: breadcrumbConverter screenshotProvider: nil];
94+
[RNSentrySessionReplay setup];
9695

9796
#if TARGET_OS_IPHONE || TARGET_OS_MACCATALYST
9897
BOOL appIsActive = [[UIApplication sharedApplication] applicationState] == UIApplicationStateActive;
@@ -585,19 +584,19 @@ - (NSDictionary*) fetchNativeStackFramesBy: (NSArray<NSNumber*>*)instructionsAdd
585584
SentryBreadcrumb* breadcrumbInstance = [[SentryBreadcrumb alloc] init];
586585

587586
NSString * levelString = breadcrumb[@"level"];
588-
SentryLevel sentryLevel;
589-
if ([levelString isEqualToString:@"fatal"]) {
590-
sentryLevel = kSentryLevelFatal;
591-
} else if ([levelString isEqualToString:@"warning"]) {
592-
sentryLevel = kSentryLevelWarning;
593-
} else if ([levelString isEqualToString:@"error"]) {
594-
sentryLevel = kSentryLevelError;
595-
} else if ([levelString isEqualToString:@"debug"]) {
596-
sentryLevel = kSentryLevelDebug;
597-
} else {
598-
sentryLevel = kSentryLevelInfo;
599-
}
600-
[breadcrumbInstance setLevel:sentryLevel];
587+
// SentryLevel sentryLevel;
588+
// if ([levelString isEqualToString:@"fatal"]) {
589+
// sentryLevel = kSentryLevelFatal;
590+
// } else if ([levelString isEqualToString:@"warning"]) {
591+
// sentryLevel = kSentryLevelWarning;
592+
// } else if ([levelString isEqualToString:@"error"]) {
593+
// sentryLevel = kSentryLevelError;
594+
// } else if ([levelString isEqualToString:@"debug"]) {
595+
// sentryLevel = kSentryLevelDebug;
596+
// } else {
597+
// sentryLevel = kSentryLevelInfo;
598+
// }
599+
// [breadcrumbInstance setLevel:sentryLevel];
601600

602601
[breadcrumbInstance setCategory:breadcrumb[@"category"]];
603602

ios/RNSentrySessionReplay.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
@interface RNSentrySessionReplay : NSObject
3+
4+
+ (void)setup;
5+
6+
@end

ios/RNSentrySessionReplay.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#import "RNSentrySessionReplay.h"
2+
#import "RNSentryBreadcrumbConverter.h"
3+
4+
@implementation RNSentrySessionReplay {}
5+
6+
+ (void)setup {
7+
RNSentryBreadcrumbConverter *breadcrumbConverter =
8+
[[RNSentryBreadcrumbConverter alloc] init];
9+
[PrivateSentrySDKOnly configureSessionReplayWith:breadcrumbConverter
10+
screenshotProvider:nil];
11+
}
12+
13+
@end

0 commit comments

Comments
 (0)