CrashReporterExtension
The base type for crash reporter extensions.
Declaration
protocol CrashReporterExtension : AppExtensionOverview
Conform to this protocol and implement processCrashReport(process:) to create a crash reporter. Your extension runs in its own process, separate from the crashed app.
The following example shows an implementation that accesses the crashed process’s corpsePort and binaryImages for use in generating a crash report.
@main
struct MyCrashExtension: CrashReporterExtension {
func processCrashReport(process: CrashedProcess) {
let corpsePort = process.corpsePort
let images = process.binaryImages
// Generate your crash report...
}
}After collecting the needed information from the crashed process, you can persist your crash report or send it back to a server you control.