The crash you can’t reproduce
A crash shows up in App Store Connect, affects a few hundred devices, and never happens on yours. The backtrace is a list of hex addresses, or worse, it points at main. Fixing it takes three things set up before the crash happens: symbol files kept for every build, a habit of checking the Organizer after each release, and enough context in your diagnostics to know what the user was doing. This guide covers all three, plus how to read the crash log once you have it.
Keep your dSYMs or lose your crashes
Release builds put debug symbols in a separate .dSYM bundle instead of the binary. Apple’s debug information guide is blunt about the rules:
- Set Debug Information Format to DWARF with dSYM File for Release. New projects already do.
- Every binary gets its own dSYM: the app, each framework, each extension.
- A binary and a dSYM match only when their build UUIDs match. Building the same commit with a different Xcode version or different settings produces a different UUID.
- Include symbols when you upload to App Store Connect, so the Crashes organizer can symbolicate reports before they reach you.
- Keep the Xcode archive for every build you distribute. Without it you may not be able to symbolicate that version ever again.
If you archive on CI, store the .xcarchive or at least its dSYMs folder as a build artifact for as long as the version is in users’ hands. Binary frameworks from vendors need their dSYMs too, and only the vendor can give you those.
Apple’s WWDC21 symbolication session explains why the dSYM matters so much. Release builds strip the symbol table, so the shipped app executable has almost no names left in it. Without a dSYM you get, at best, function start offsets with no names. The session also notes a size ceiling of about 4 GB of DWARF per binary. Very large apps that approach it need to split into frameworks with their own dSYMs.
The Xcode Organizer
Window > Organizer shows data Apple collects from users who agreed to share analytics with developers. You get it without adding any code.
Crashes
The Crashes organizer groups reports by crash point and ranks them by unique devices affected, with filters for version, build, product type and TestFlight or App Store. Each crash point opens a symbolicated sample log if you uploaded symbols, and you can jump to the matching line in your project. Start every release review here: sort by the newest version and look for crash points that didn’t exist in the previous one.
Hangs and responsiveness
Apple’s responsiveness guide defines the hang rate as seconds of unresponsiveness per hour, counting only periods longer than 250 ms, shown at the median and the 90th percentile. When the main thread is unresponsive for 1 second or longer, the system samples a backtrace, and the Hangs reports group those samples by similar stacks. Each report shows its share of total hang time, which is the number to prioritise by.
Xcode 26 added trending insights, marked with a flame icon, for hang and launch diagnostics whose impact grew over the last four app versions. That’s often the fastest way to find which release introduced a problem.
What’s new in Xcode 27
The Xcode 27 release notes list several Organizer changes:
- An Insights Overview that summarises high-impact regressions across metrics and diagnostics.
- A Hitches metric that replaces the Scrolling metric and covers all animations, not only scrolling.
- Storage metrics for Documents & Data and app size across releases.
- Metric goals for battery, disk writes, hang rate, hitches, memory and storage, with similar-app goals for some of them.
- Generate Recommendations for crash, energy, disk write, hang and launch diagnostics, which sends the call path and stack trace to the coding assistant in your project.
Treat generated recommendations as a starting point and confirm them against the stack yourself.
MetricKit: the same data, in your app
The Organizer is aggregated and delayed, and you can’t join it to your own logs or user accounts. MetricKit gives you the raw reports on the device, so you can upload them to your own backend.
iOS 27: MetricManager
iOS 27 introduced a new Swift API. MetricManager is a class you instantiate and keep alive, with two async sequences: metricReports, delivered at most once a day with the previous 24 hours, and diagnosticReports, delivered as each crash, hang or exception happens. Apple’s docs ask you to create one instance and share it, since two tasks iterating the same sequence on separate instances each receive an unpredictable subset of reports. Both report types are Codable.
import Foundation
import MetricKit
import os
actor DiagnosticsUploader {
func upload(_ data: Data) async {
}
}
@available(iOS 27.0, *)
final class PerformanceReporting: Sendable {
private let manager = MetricManager()
private let uploader = DiagnosticsUploader()
private let log = Logger(subsystem: "com.example.reader", category: "metrics")
func start() {
Task.detached { [manager, uploader, log] in
for await report in manager.diagnosticReports {
do {
let data = try JSONEncoder().encode(report)
await uploader.upload(data)
} catch {
log.error("Encoding diagnostic failed: \(error.localizedDescription)")
}
}
}
}
}
The upload body is left out. Call start() early in launch and keep the PerformanceReporting instance for the app’s lifetime. To handle each kind of event separately, switch over report.result, which is a DiagnosticResult with cases including .crash, .hang, .cpuException, .diskWriteException and .appLaunch. A crash carries a CrashDiagnostic with a callStackTree. Add @unknown default, since Apple adds cases over time. The WWDC26 MetricKit session mentions two additions in iOS 27: memory exception diagnostics when an app or extension is terminated for exceeding its memory limit, and a termination category on crash diagnostics that shows how the crash was counted in metrics.
MXMetricManager, the older API, is deprecated as of iOS 27.3 according to its documentation, and the new capabilities exist only on MetricManager.
Earlier versions: MXMetricManager
If you support iOS 26 or earlier, keep a subscriber for those versions behind an availability check. Register with MXMetricManager.shared.add(_:) and implement didReceive(_:) for diagnostic payloads. Since iOS 15, diagnostics arrive right away rather than with the daily batch.
import MetricKit
final class LegacyMetricsSubscriber: NSObject, MXMetricManagerSubscriber {
func didReceive(_ payloads: [MXDiagnosticPayload]) {
for payload in payloads {
let json: Data = payload.jsonRepresentation()
store(json)
}
}
private func store(_ json: Data) {
}
}
store(_:) is left for your persistence layer. Register the subscriber once at launch on iOS versions before 27, and use MetricManager on iOS 27 and later.
Context makes diagnostics useful
Bruno Rocha argues in How To Solve Any iOS Crash Ever that hard crashes are usually hard because information is missing, not because the bug is complicated. His advice is to record what the user was doing, such as the current screen, the last action and feature flags, so a report tells you where to look. iOS 27 builds that idea into MetricKit. With the StateReporting framework you report stable app states per domain, pass those domains to MetricManager(enabledStateReportingDomains:), and each DiagnosticReport carries the states that were active when the event occurred. Metric reports gain stateEntries, broken down by state. Keep states coarse, such as a tab, a mode or an experiment group. Apple’s docs warn about a limit on unique states per reporting period, flagged by hasExceededStateLimit.
Testing your pipeline
Diagnostics don’t arrive on demand, so test the plumbing with simulated data. Run the app from Xcode on a physical device and choose Debug > MetricKit > Simulate MetricKit Payloads. The reports contain sample data, not your app’s, but they exercise your decoding and upload path. Apple also notes that MetricKit doesn’t produce a report for every occurrence. Hang diagnostics, for example, depend on hang detection being active on that device.
Symbolicating a crash yourself
When a report arrives from a tester, a vendor tool or MetricKit, you may need to symbolicate it by hand. Apple’s symbolication guide lists the options in order of convenience:
- Open it in Xcode. Drag a
.ipsor.crashfile onto Xcode and pick the project. In Xcode 27, crash logs from a connected device are under the Reports tab in Device Hub. xcrun crashlogloads the report into LLDB and resolves every frame to file and line.atosresolves single addresses when you need precision.
xcrun crashlog ~/Downloads/Reader-2026-11-28.ips
atos -arch arm64 \
-o Reader.app.dSYM/Contents/Resources/DWARF/Reader \
-l 0x104598000 -i 0x1045a4610
-l is the load address of the binary from the Binary Images section at the bottom of the report. -i expands inlined frames, which optimised builds create in large numbers.
If symbolication fails for your own binary, find the dSYM by UUID. The missing dSYM guide takes the UUID from the Binary Images line, formats it as uppercase with dashes, and searches Spotlight:
mdfind "com_apple_xcode_dsym_uuids == E3EA8743-C9E6-3C68-BF04-8D51363B689D"
dwarfdump --uuid Reader.app.dSYM
If mdfind returns nothing, the archive is missing or sits in a folder Spotlight doesn’t index. If system frames stay unsymbolicated, Xcode needs the device symbols for that OS version.
Reading a crash log
Read a crash report top to bottom, in this order.
Header. App version and build, OS version and device model. Check the build first: you might be looking at a crash already fixed in a newer build.
Exception type. This tells you how the process died. From Apple’s exception types reference:
| Exception | Usual meaning |
|---|---|
EXC_BREAKPOINT (SIGTRAP) |
A trap, often a Swift runtime check: force unwrap of nil, index out of range, fatalError |
EXC_BAD_ACCESS (SIGSEGV) |
Access to an invalid or out-of-bounds address |
EXC_BAD_ACCESS (SIGBUS) |
Misaligned or invalid address, or a pointer authentication failure |
EXC_CRASH (SIGABRT) |
The process aborted, often an uncaught Objective-C exception |
EXC_CRASH (SIGKILL) |
The system killed the process, for example over a background task rule or resource limits |
EXC_RESOURCE |
A resource limit such as CPU time or memory was exceeded |
EXC_GUARD |
A guarded resource, often a file descriptor, was misused |
Termination reason and exception message. For Swift runtime traps, the symbolicated frame often names the check directly, such as “Swift runtime failure: Index out of range”. For SIGABRT, look for the last exception backtrace, which shows where an Objective-C exception was thrown.
The crashed thread. Find the thread marked as crashed and read from the top until you reach the first frame in your own module. That frame is usually where to start, not necessarily the root cause. Rocha’s investigation order fits here: crashed thread first, then your context data, then the other threads, because a background thread mutating shared state is a common cause of a crash that shows up on the main thread.
Binary images. The list at the bottom maps each binary to its load address and UUID. You need both for atos, and the UUID tells you which dSYM matches.
Traps
- Lost archives. Deleting old archives to free disk space deletes your ability to read those versions’ crashes.
- Rebuilding to get symbols. Rebuilding the same commit with another Xcode version or different settings gives a different UUID that won’t match. The original archive’s dSYM is the one you can rely on.
- Third-party binaries without symbols. Ask vendors for dSYMs before you ship their framework, not after it crashes.
- Multiple MetricManager instances. Two instances iterating the same sequence split the reports between them unpredictably.
- Treating MetricKit as complete. It covers consenting users and sampled events. It shows trends and representative stacks, not every crash.
- Fixing the top frame. The line that crashed is often where bad state was detected, not where it was created.
Release checklist
| Before release | After release |
|---|---|
| Release config uses DWARF with dSYM File | Check Crashes organizer for new crash points |
| Upload includes symbols | Compare hang rate and hitches with the last version |
| Archive stored for this build | Review trending insights and the Insights Overview |
| MetricKit subscriber running, with app states reported | Sample MetricKit diagnostics in your backend |
| Vendor dSYMs collected | Symbolicate any tester-provided .ips files |
Sources and further reading
- Monitoring app performance with MetricKit Apple Developer Documentation
- MetricManager Apple Developer Documentation
- MXMetricManager Apple Developer Documentation
- Meet the new MetricKit (WWDC26) Apple
- Analyzing responsiveness issues in your shipping app Apple Developer Documentation
- Adding identifiable symbol names to a crash report Apple Developer Documentation
- Building your app to include debugging information Apple Developer Documentation
- Locating a missing debug symbol file Apple Developer Documentation
- Understanding the exception types in a crash report Apple Developer Documentation
- Symbolication: Beyond the basics (WWDC21) Apple
- Xcode 27 Release Notes Apple Developer Documentation
- How To Solve Any iOS Crash Ever Bruno Rocha, SwiftRocks