Sentry iOS crash reports

Hi there,

I’m using the latest Senry Sdk for iOS - sentry-cocoa 4.1.0, and would like to acheive one of the following:

  1. Disable crash reports from Sentry, and allow only events with stack trace to be sent.
  2. Keep Sentry crash reports, but keep existing crash reporting library working.
    On our app we’re also using Bugsee, which stopped sending crash reports after the Sentry integration.

Could you please help me?

Hey, disabling the crash reporting with Sentry you just don’t call

try Client.shared?.startCrashHandler()

ref: https://docs.sentry.io/clients/cocoa/

And to attach the stacktrace you can use this:

Hope that helps

Hi HazAT,
When i’m not calling startCrashHander, and trying to send an event i get:
SentryCrash has not been initialized, call startCrashHandlerWithError

This is how I send events:
`
[[SentryClient sharedClient] snapshotStacktrace:^{

SentryEvent *event = [[SentryEvent alloc]initWithLevel:kSentrySeverityError];
[event setMessage:message];
[event setUser:[[SentryUser alloc] initWithUserId:userId]];
[[SentryClient sharedClient] appendStacktraceToEvent:event];
[[SentryClient sharedClient] sendEvent:event withCompletionHandler:NULL];

}];`

Oh, you are right, sorry I forgot about this, we have to document that this currently is a limitation.
Sorry, I guess you can’t send the event with a stack trace as of right now :confused:

Thanks for you reply @HazAT!
Is there an older version of Sentry that support this? do you have an estimation when this will be supported?
We’re currently using the old Raven Sdk, this is a blocker for us to upgrade to the latest Cocoa Sdk.

This wasn’t on our radar up until now:

It could be an easy fix, refactoring this function to just call install once.

You could go ahead and submit a PR if it works.

Thanks,

I was able to keep my original crash handler by moving the Sentry initialisation block after my original handler.