Skip to content

Sentry.crashedLastRun in React Native #2797

@krystofwoldrich

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Status

    No status

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions