Use cached methods SentryDebugImageProvider of the Cocoa SDK
Description
Replace https://github.com/getsentry/sentry-react-native/blob/a3712749433c1ad536f4faf9a94520fabc9c791e/ios/RNSentry.mm#L323
with either SentryDebugImageProvider.getDebugImagesFromCacheForFrames or SentryDebugImageProvider.getDebugImagesFromCacheForThreads added in https://github.com/getsentry/sentry-cocoa/pull/4435, which will most likely ship with Cocoa 8.39.0. getDebugImagesForAddresses is slow and caused AppHangs on iOS; see https://github.com/getsentry/sentry-cocoa/issues/4399.
Hey @philipphofmann, @krystofwoldrich 👋
Following up on the conversation here, would it make sense to also expose the getDebugImagesForImageAddressesFromCache in the SentryDebugImageProvider+HybridSDKs.h?
The method is used in the getDebugImagesFromCacheForFrames and getDebugImagesFromCacheForThreads implementation that are exposed and could make the RN side migration more straightforward.
https://github.com/getsentry/sentry-react-native/blob/a989877aa578d652ec0683764d802bb6bb6cbd2e/packages/core/ios/RNSentry.mm#L323
I can open a PR on sentry-cocoa if you agree or use the private method.
Yes, let's add getDebugImagesForImageAddressesFromCache to the hybrid SDKs header.
Yes, let's add getDebugImagesForImageAddressesFromCache to the hybrid SDKs header.
Opened https://github.com/getsentry/sentry-cocoa/pull/4460 and I plan to update my RN PR that currently uses the private method as soon as the next sentry-cocoa version is released.