`Sentry.crashedLastRun` in React Native
Description
The native SDK can give users information about crashedLastRun but RN SDK doesn't have such a feature. It might be useful for RN devs too.
Some user patched this feature in their app like this, but it's not working in the last RN SDK version.
RCT_EXPORT_METHOD(didCrashLastLaunch:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject)
{
if ([SentrySDK crashedLastRun]) {
resolve(@YES);
} else {
resolve(@NO);
}
}
I don't think we have this feature on the Android SDK tho, so let's confirm and raise an issue on the Android SDK as well if needed.
I think this PR added it
- https://github.com/getsentry/sentry-java/pull/1739
Indeed, ok, that was more than a year ago :D
Hello, I was trying to use the isCrashedLastRun on Android with Kotlin but it didn't work.
Is it still not implemented?
Thank you for your answers.
@MikaReesu Hi, thank you for the message, this is not implemented in RN yet.
Only in the native SDKs (cocoa, java) at the moment.
I see, thank you.
This would be quite helpful!
@LonelyCpp Thanks for letting us know you're interested.