diff --git a/CHANGELOG.md b/CHANGELOG.md index bed86f02c0..7d7b08669b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ - Skips ignoring require cycle logs for RN 0.70 or newer ([#4214](https://github.com/getsentry/sentry-react-native/pull/4214)) - Enhanced accuracy of time-to-display spans. ([#4189](https://github.com/getsentry/sentry-react-native/pull/4189)) +- Speed up getBinaryImages for finishing transactions and capturing events ([#4194](https://github.com/getsentry/sentry-react-native/pull/4194)) ### Features diff --git a/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm b/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm index 297022311e..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 @@ -327,9 +328,9 @@ - (void)prepareNativeFrameMocksWithLocalSymbolication:(BOOL)debug OCMStub([sentryDebugImageMock serialize]).andReturn(serializedDebugImage); id sentryDebugImageProviderMock = OCMClassMock([SentryDebugImageProvider class]); - OCMStub([sentryDebugImageProviderMock - getDebugImagesForAddresses:[NSSet setWithObject:@"0x000000000001b669"] - isCrash:false]) + OCMStub( + [sentryDebugImageProviderMock + getDebugImagesForImageAddressesFromCache:[NSSet setWithObject:@"0x000000000001b669"]]) .andReturn(@[ sentryDebugImageMock ]); OCMStub([sentryDependencyContainerMock debugImageProvider]) diff --git a/packages/core/ios/RNSentry.h b/packages/core/ios/RNSentry.h index 06e1569a16..cfd0b74b28 100644 --- a/packages/core/ios/RNSentry.h +++ b/packages/core/ios/RNSentry.h @@ -13,13 +13,6 @@ typedef int (*SymbolicateCallbackType)(const void *, Dl_info *); -@interface -SentryDebugImageProvider () -- (NSArray *_Nonnull)getDebugImagesForAddresses: - (NSSet *_Nonnull)addresses - isCrash:(BOOL)isCrash; -@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 7728a1b70a..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 @@ -368,9 +369,9 @@ - (NSDictionary *)fetchNativeStackFramesBy:(NSArray *)instructionsAd 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]];