Archive for June 22, 2026

Monday, June 22, 2026

CrashReportExtension

CrashReportExtension:

The Crash Report Extension framework allows you to perform analysis and produce a report when your app crashes. Your crash-handling code executes out-of-process, rather than from a signal handler or other in-process techniques.

You implement your handler by writing an app extension that conforms to the CrashReporterExtension protocol. The system calls your processCrashReport(process:) method when the app crashes. Use the CrashedProcess parameter to inspect the state of the crashed app by retrieving a crash reason, symbolicating relevant addresses, and communicating with the process over a read-only Mach port. After collecting the crash data, you can send a report back to your own server.

[…]

Crash Report Extension is available on iOS 27 and later. It isn’t available to Catalyst-based macOS apps, or on iOS apps running on Mac computers with Apple silicon.

The top of the page says “macOS 27.0+,” so I guess this means it does work for regular AppKit and SwiftUI Mac apps. It’s great to finally have a supported way to do this.

I don’t know why they can’t just give you the crash report text or .ips JSON directly, though. It looks like you have to use Mach IPC with the corpsePort to get the backtrace for each thread and then use the extension API to symbolicate the addresses. Even then, I’m not sure you can get all the information that’s in a standard crash report, such as the Application Specific Backtrace. Maybe you can find the address for gCRAnnotations/__crashreporter_info__ and load it with mach_vm_read?

Previously: