Hi,
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 (https://docs.fabric.io/apple/crashlytics/os-x.html). 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?