From a216aed6ae54b68f2d87bd632eef51055dfaf907 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 21 Oct 2024 11:37:48 +0300 Subject: [PATCH 1/5] Updates sentry-cocoa to 8.39.0-beta.1 --- packages/core/RNSentry.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/RNSentry.podspec b/packages/core/RNSentry.podspec index 0f26b95057..e7d8b645df 100644 --- a/packages/core/RNSentry.podspec +++ b/packages/core/RNSentry.podspec @@ -37,7 +37,7 @@ Pod::Spec.new do |s| s.compiler_flags = other_cflags - s.dependency 'Sentry/HybridSDK', '8.38.0' + s.dependency 'Sentry/HybridSDK', '8.39.0-beta.1' if defined? install_modules_dependencies # Default React Native dependencies for 0.71 and above (new and legacy architecture) From ba5d1d381e5745a7025a9d4eec37cfb3c1fcfbcb Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 21 Oct 2024 11:42:10 +0300 Subject: [PATCH 2/5] Replaces getDebugImagesForAddresses:isCrash: with getDebugImagesForImageAddressesFromCache --- .../RNSentryCocoaTesterTests/RNSentryTests.mm | 2 +- packages/core/ios/RNSentry.h | 2 +- packages/core/ios/RNSentry.mm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm b/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm index 615deb45c4..3ea94906a4 100644 --- a/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm +++ b/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm @@ -215,7 +215,7 @@ - (void)prepareNativeFrameMocksWithLocalSymbolication: (BOOL) debug OCMStub([sentryDebugImageMock serialize]).andReturn(serializedDebugImage); id sentryDebugImageProviderMock = OCMClassMock([SentryDebugImageProvider class]); - OCMStub([sentryDebugImageProviderMock getDebugImagesForAddresses:[NSSet setWithObject:@"0x000000000001b669"] isCrash:false]).andReturn(@[sentryDebugImageMock]); + OCMStub([sentryDebugImageProviderMock getDebugImagesForImageAddressesFromCache:[NSSet setWithObject:@"0x000000000001b669"]]).andReturn(@[sentryDebugImageMock]); OCMStub([sentryDependencyContainerMock debugImageProvider]).andReturn(sentryDebugImageProviderMock); } diff --git a/packages/core/ios/RNSentry.h b/packages/core/ios/RNSentry.h index 4b5233c985..93213a10dd 100644 --- a/packages/core/ios/RNSentry.h +++ b/packages/core/ios/RNSentry.h @@ -14,7 +14,7 @@ typedef int (*SymbolicateCallbackType)(const void *, Dl_info *); @interface SentryDebugImageProvider () -- (NSArray * _Nonnull)getDebugImagesForAddresses:(NSSet * _Nonnull)addresses isCrash:(BOOL)isCrash; +- (NSArray * _Nonnull)getDebugImagesForImageAddressesFromCache:(NSSet * _Nonnull)addresses; @end @interface diff --git a/packages/core/ios/RNSentry.mm b/packages/core/ios/RNSentry.mm index a04733e7b5..2528ae26e2 100644 --- a/packages/core/ios/RNSentry.mm +++ b/packages/core/ios/RNSentry.mm @@ -320,7 +320,7 @@ - (NSDictionary*) fetchNativeStackFramesBy: (NSArray*)instructionsAdd } else { NSMutableArray *> * _Nonnull serializedDebugMetaImages = [[NSMutableArray alloc] init]; - NSArray *debugMetaImages = [[[SentryDependencyContainer sharedInstance] debugImageProvider] getDebugImagesForAddresses:imagesAddrToRetrieveDebugMetaImages isCrash:false]; + NSArray *debugMetaImages = [[[SentryDependencyContainer sharedInstance] debugImageProvider] getDebugImagesForImageAddressesFromCache:imagesAddrToRetrieveDebugMetaImages]; for (SentryDebugMeta *debugImage in debugMetaImages) { [serializedDebugMetaImages addObject:[debugImage serialize]]; From deff766e988874cf5ba4d8c5a474670b5586d0ad Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 21 Oct 2024 11:49:59 +0300 Subject: [PATCH 3/5] Updates changelog --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12832018fd..667cc882fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ > make sure you follow our [migration guide](https://docs.sentry.io/platforms/react-native/migration/) first. +## Unreleased + +### Changes + +- Use cached methods SentryDebugImageProvider of the Cocoa SDK ([#4194](https://github.com/getsentry/sentry-react-native/pull/4194)) + +### Dependencies + +- Bump Cocoa SDK from v8.38.0 to v8.39.0-beta.1 ([#4194](https://github.com/getsentry/sentry-react-native/pull/4194)) + - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8390-beta1) + - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.38.0...8.39.0-beta.1) + ## 6.0.0 This is a new major version 6.0.0 of the Sentry React Native SDK. From 623525704eb4a9c28239cd89267002f8f56c6d24 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 28 Oct 2024 14:26:56 +0200 Subject: [PATCH 4/5] Updates sentry-cocoa to 8.39.0 --- packages/core/RNSentry.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/RNSentry.podspec b/packages/core/RNSentry.podspec index e7d8b645df..03c1f22d10 100644 --- a/packages/core/RNSentry.podspec +++ b/packages/core/RNSentry.podspec @@ -37,7 +37,7 @@ Pod::Spec.new do |s| s.compiler_flags = other_cflags - s.dependency 'Sentry/HybridSDK', '8.39.0-beta.1' + s.dependency 'Sentry/HybridSDK', '8.39.0' if defined? install_modules_dependencies # Default React Native dependencies for 0.71 and above (new and legacy architecture) From 48fdebdb1a6f068fbcbcba026dbd43f4bdc60e94 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 7 Nov 2024 11:38:36 +0200 Subject: [PATCH 5/5] Remove private function declaration --- .../RNSentryCocoaTesterTests/RNSentryTests.mm | 1 + packages/core/ios/RNSentry.h | 6 ------ packages/core/ios/RNSentry.mm | 1 + 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm b/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm index 7368d2676b..a72ed1e0bf 100644 --- a/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm +++ b/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm @@ -1,6 +1,7 @@ #import "RNSentryTests.h" #import #import +#import #import #import diff --git a/packages/core/ios/RNSentry.h b/packages/core/ios/RNSentry.h index ce477aed46..cfd0b74b28 100644 --- a/packages/core/ios/RNSentry.h +++ b/packages/core/ios/RNSentry.h @@ -13,12 +13,6 @@ typedef int (*SymbolicateCallbackType)(const void *, Dl_info *); -@interface -SentryDebugImageProvider () -- (NSArray *_Nonnull)getDebugImagesForImageAddressesFromCache: - (NSSet *_Nonnull)addresses; -@end - @interface SentrySDK (Private) @property (nonatomic, nullable, readonly, class) SentryOptions *options; diff --git a/packages/core/ios/RNSentry.mm b/packages/core/ios/RNSentry.mm index e247cd26a3..689541b050 100644 --- a/packages/core/ios/RNSentry.mm +++ b/packages/core/ios/RNSentry.mm @@ -21,6 +21,7 @@ #import #import #import +#import #import #import #import