Skip to content

Sentry.crashedLastRun in React Native #2797

Description

@krystofwoldrich

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);
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions