Mac app exceptions


I’m having trouble getting any useful reports from Mac app crashes…

I’ve created a fresh Mac app project now, connfigured Sentry in it (via CocoaPods), and added two buttons to it - one calls a missing method on an object, and the other throws an NSException using @throw (ObjC). I archived the app and exported it from Xcode.

When I run the app like this, the app doesn’t crash at all when I press the buttons. The exception is probably printed to some kind of log, but the app stays open and I get no reports.

I remembered from Crashlytics that their docs recommended setting a NSApplicationCrashOnExceptions property in the defaults to enable catching of such crashes ( I did that here, and I am getting a report, but… it only mentions [NSApplication reportException:] and [NSApplication _crashOnException:], nothing about my code. In HockeyApp they instead have a custom NSApplication subclass that you’re supposed to configure as the “principal class”, but I couldn’t find anything like that in your docs.

Am I doing anything wrong, did I miss something? Is there anything I can do to make Sentry catch exceptions from in a Mac app?

Hey, thank you for reporting this.
I will look into this and I’ve also created an issue on GitHub to keep track of it:

1 Like

@mackuba I’ve released 3.7.0 of sentry-cocoa which should be able to capture uncaught exceptions on macOS.
Please upgrade and see for details.
If you are still having troubles, please post your comment on the Github issue, it’s easier for me to track.

My developer made an app for macOS which deals which helps with IOS upgrade but after installing it in a client’s PC, it had a problem with upgrading iPhone and an error popped up which was called iPhone Error 4013.