Most small teams don't lack crash data. They lack a habit for dealing with it. An SDK gets added in the first week, the dashboard fills with reports nobody can read, and after a while people stop opening it. Then a one-star review describes a crash that had been sitting in the dashboard for a month.
This post covers a lightweight setup for iOS and Android that a team of one to five people can keep running. There are two goals: every crash report should be readable, and a short, repeatable routine should decide what gets fixed.
Step 1: Make every stack trace readable
A crash report without symbols is a list of memory addresses. Before you look at a tool or a dashboard, make sure your release pipeline produces and uploads the files needed to turn addresses back into function names and line numbers.
iOS
- Set
Debug Information FormattoDWARF with dSYM Filefor your Release configuration, including any app extensions and your own frameworks. - Archive every build you ship and keep the archive. The dSYM inside it matches only that exact build, by UUID.
- If you use a third-party crash reporter, upload the dSYMs as part of your release script, not by hand. Uploads you have to remember to do are the ones that get skipped.
- Check it worked: run
dwarfdump --uuid YourApp.app.dSYMand compare the UUID against the one shown on an unsymbolicated report.
Android
- If R8 minification is on, each release build writes a
mapping.txtfile underbuild/outputs/mapping/release/. Store it with the build artifacts and upload it to the Play Console, and to your crash reporter if you use one. - If you ship native code (NDK, or libraries that bundle
.sofiles), set up native debug symbols as well. Otherwise native crashes will show up as raw offsets. - Tag every artifact with
versionCode. A mapping file from the wrong build is worse than no mapping file, because the deobfuscated trace looks correct but points at the wrong code.
android {
buildTypes {
release {
isMinifyEnabled = true
ndk {
debugSymbolLevel = "SYMBOL_TABLE"
}
}
}
}Test this whole step once on purpose. Add a hidden debug action that crashes the app, ship it to an internal or TestFlight build, trigger it, and confirm the report shows your function name. Remove the action afterwards, or put it behind a flag that can't be reached in production.
Step 2: Use what the platform already collects
Both platforms collect diagnostics without any SDK. Even if you also use a third-party reporter, these are worth knowing about because they catch failures that in-process reporters can miss, such as watchdog terminations and out-of-memory kills.
iOS: Xcode Organizer and MetricKit
The Crashes pane in Xcode Organizer shows symbolicated crashes from users who opted in to sharing diagnostics. To get the same data in your own pipeline, subscribe to MetricKit:
import MetricKit
final class DiagnosticsReceiver: NSObject, MXMetricManagerSubscriber {
func didReceive(_ payloads: [MXDiagnosticPayload]) {
for payload in payloads {
let data = payload.jsonRepresentation()
// Write to disk and upload on next launch with network.
}
}
}
// At launch, keep a strong reference:
let receiver = DiagnosticsReceiver()
MXMetricManager.shared.add(receiver)The payloads include crash, hang, and disk-write diagnostics with call stack trees. Delivery is batched, so don't use it for real-time alerting. It's good for spotting trends and catching hangs that never show up as crashes.
Android: Android vitals and ApplicationExitInfo
Android vitals in the Play Console groups crashes and ANRs by cluster and shows which ones Google Play counts against its bad-behavior thresholds. On Android 11 and later, you can also ask the system why your process died the last time it exited:
val am = context.getSystemService(ActivityManager::class.java)
val exits = am.getHistoricalProcessExitReasons(context.packageName, 0, 5)
for (info in exits) {
when (info.reason) {
ApplicationExitInfo.REASON_CRASH,
ApplicationExitInfo.REASON_CRASH_NATIVE,
ApplicationExitInfo.REASON_ANR,
ApplicationExitInfo.REASON_LOW_MEMORY -> {
// Log info.reason, info.timestamp, info.description
}
}
}Record which exit timestamps you have already handled so the same exit isn't reported on every launch. For ANRs, info.traceInputStream gives you the thread dump, which usually shows what was blocking the main thread.
Step 3: Add context, not noise
A stack trace shows where the app died. Context helps you work out why. Keep it small and deliberate:
- Build identity: version, build number, and the git commit hash. The hash saves a lot of guessing.
- Breadcrumbs: the last ten to twenty screen changes or key actions, such as "opened editor" or "sync started". Leave out every tap.
- State flags: signed in or not, offline or not, which feature flags are on.
- Never personal data: no email addresses, message contents, or file names users typed. Use opaque IDs if you need to correlate reports. This also keeps your privacy disclosures accurate.
If a field has never once helped you diagnose a crash, delete it.
Step 4: A weekly triage routine
This is the step most teams skip. Pick a fixed slot, for example thirty minutes every Monday, and give one person the job each week. Go through the top crash clusters in order and put each one in one of four buckets:
- Fix now: crashes on launch, data loss, crashes in payment or onboarding flows, or anything that appeared or grew sharply in the newest release.
- Schedule: real bugs with moderate reach. Create a ticket that links the cluster and lists the build where it started.
- Watch: rare crashes you can't explain yet. Add a breadcrumb or log line that would help next time, and check again next week.
- Ignore, explicitly: crashes from jailbroken or rooted devices, system frameworks you can't affect, or very old OS versions you no longer support. Write down the reason so nobody looks into it again.
To rank clusters, look at three things your tools already show: how many distinct users are affected (not how many events), how bad the crash is for those users, and which way the trend is going since the last release. A crash that hits a few users but is climbing usually matters more than a large one that has been stable for months.
The output of triage is a decision, not a fix. If a cluster leaves the meeting without a bucket, the meeting didn't do its job.
Step 5: Close the loop
For each crash you fix:
- Reproduce it first if you can. Breadcrumbs and state flags usually narrow it down to a specific path.
- Write a test that fails before the fix. Crashes caused by unexpected nil values, empty lists, or decoding errors are often easy to cover with a unit test.
- Reference the cluster in the commit message so you can trace it later.
- Verify after release. Compare the cluster's affected-user count, and your crash-free users or sessions figure, for the old and new versions over the same number of days after release. A fix you haven't measured is only a guess.
Common traps
- Multiple crash SDKs at once. Signal handlers can conflict, and you end up with several dashboards that disagree. Pick one reporter plus the platform's own diagnostics.
- Alerting on everything. If every new crash sends a notification, people learn to ignore them. Only alert on regressions in the newest release and on launch crashes.
- Ignoring hangs and ANRs. To a user, a frozen screen they have to force-quit is a crash. Treat these as first-class issues.
- Losing old symbols. People stay on old versions for a long time. Keep dSYMs and mapping files for every build that's still in use.
Wrapping up
Crash reporting only pays off if someone acts on the reports. For a small team, the setup above is enough: symbol uploads in the release pipeline, the platform diagnostics you already get for free, a small amount of useful context, and one short weekly session that puts every major crash cluster into a bucket. Set it up once, check that it works with a deliberate test crash, and then keep the routine going.