Issue
I want to programmatically collect info on the last crash in my app so that I can take certain actions using that info, examples:
- resting certain locally persisted information
- showing a support dialog or even collecting User Feedback
Applies To
- Cocoa SDK users
Resolution
You can use the
onCrashedLastRun
option in your Sentry initialization code to add a callback on app start that can be used to get information about the most recent crash in your app. This callback is intended for use with our User Feedback API however it is not required to be used only in the that way.