Capture and submit crashes to Stacksift.
This library ties together Wells and Impact to provide a full crash capturing and submission system. It is not required, but can be handy if you just want to drop something in and get going. It supports macOS 13.0+, iOS 12.0+, and tvOS 12.0+.
Swift Package Manager:
dependencies: [
.package(url: "https://github.com/stacaksift/SDK.git")
]
All you need to do is import Stacksift
, and call then call start
early in your app's lifecycle.
import Stacksift
...
Stacksift.start(APIKey: "my key")
Unfortunately, AppKit intefers with the flow of runtime exceptions. If you want to capture information about uncaught exceptions, some extra work is required.
The top-level NSApplication
instance for your app must be a subclass of ImpactMonitoredApplication
.
import Impact
class Application: ImpactMonitoredApplication {
}
and, you must update your Info.plist to ensure that the NSPrincipalClass
key references this class with <App Module Name>.Application
.
I realize this is a huge pain. If you feel so motivated, please file feedback with Apple to ask them to make AppKit behave like UIKit in this respect.
I would also stronly recommend setting the NSApplicationCrashOnExceptions
defaults key to true. The default setting will allow your application to continue executing post-exception, virtually guaranteeing state corruption and incorrect behavior.
We'd love to hear from you! Get in touch via twitter, an issue, or a pull request.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.