How to disable crash from being sent on iOS

I would like to ability to disable crashes but still allow user feedback to go through. Is there a way to do this? Thanks!

User Feedback are tight to an event. In Sentry they show up with the issue, and the specific event it came with (it’s a user description of the issue Sentry collected data like crumbs, tags and stacktrace for your).

Could you please elaborate on your use case? You want to use Sentry simply as a user feedback tool?

We would like the ability to disable either crash or bug (in this context, user feedback) reporting. For example, InstaBug had CrashReporting and BugReporting flags to toggle. I was hoping Sentry has something similar.

Disabling user feedback is easy, since we just have a guard statement before the event is created and captured that checks a flag local to our project.

We would like to use all that Sentry has to offer, but we would like a failsafe as a “just-in-case”.

You can drop an event with the beforeSend callback.

Same strategy as you use with the user feedback where you control the flag outside of the SDK.

If you return nil from it, it’ll drop the event.

When you startWithOptions the SDK sets the signal handler to capture the crash. We don’t have a mechanism to “undo that” once it’s done. So what you’d be doing here is basically throwing away the event before sending it to Sentry but the crash would be generated on the device anyway.

1 Like

I appreciate the clarification! :slight_smile:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.