From 309703918f89c980095a550a789179d70cba84ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Wold=C5=99ich?= <31292499+krystofwoldrich@users.noreply.github.com> Date: Wed, 3 May 2023 11:14:55 +0200 Subject: [PATCH] fix(ios): Store envelopes immediately during a fatal crash (#3031) --- CHANGELOG.md | 6 ++++++ ios/RNSentry.mm | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c810a4324..d7f94904f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- Store envelopes immediately during a fatal crash on iOS ([#3031](https://github.com/getsentry/sentry-react-native/pull/3031)) + ## 5.4.0 ### Features diff --git a/ios/RNSentry.mm b/ios/RNSentry.mm index 0f6f631e1..e03b1f444 100644 --- a/ios/RNSentry.mm +++ b/ios/RNSentry.mm @@ -317,7 +317,7 @@ - (void)setEventEnvironmentTag:(SentryEvent *)event #if DEBUG [PrivateSentrySDKOnly captureEnvelope:envelope]; #else - if (options[@'store']) { + if (options[@"store"]) { // Storing to disk happens asynchronously with captureEnvelope [PrivateSentrySDKOnly storeEnvelope:envelope]; } else {