Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement crashedLastRun #4014

Merged
merged 9 commits into from
Aug 26, 2024

Conversation

janicduplessis
Copy link
Contributor

@janicduplessis janicduplessis commented Aug 9, 2024

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

This exposes crashedLastRun from the iOS sdk and isCrashedLastRun from the android sdk to react native.

It is useful to know if the app crashed in the previous launch.

💡 Motivation and Context

Fixes #2797

💚 How did you test it?

Tested in an app on iOS and Android by making it crash then checking that it returns true on next open, or false if didn't crash before.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • All tests passing
  • No breaking changes

🔮 Next steps

@janicduplessis janicduplessis marked this pull request as ready for review August 9, 2024 21:15
@krystofwoldrich
Copy link
Member

@janicduplessis Thank you for the PR, we'll review this shortly.

src/js/sdk.tsx Outdated Show resolved Hide resolved
@janicduplessis janicduplessis force-pushed the @janic/crash-last-run branch 4 times, most recently from 43d82b6 to 95cd530 Compare August 15, 2024 17:39
@janicduplessis
Copy link
Contributor Author

Updated to return null when the sdk does. Also added it to the sample app.

@krystofwoldrich
Copy link
Member

Awesome, thank you, I'll review the changes soon.

src/js/wrapper.ts Outdated Show resolved Hide resolved
@krystofwoldrich
Copy link
Member

I've added simple test for the JS interface, but besides that it looks good.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sentry.crashedLastRun in React Native
3 participants