Memory kills are the crashes that leave no crash report. iOS ends your app when it uses too much memory, and from your side the session simply stops. Without a signal for this, a rise in memory exits looks like users drifting away, and the real cause sits unnoticed for weeks.
Sentry Cocoa 9.32.0 adds help here. On iOS 27 and later it can capture MetricKit memory exception diagnostics. It also adds options.experimental.metrickit.enabledDiagnosticReports, so you choose which MetricKit diagnostic reports are sent, and enabledMetricReports, which sends MetricKit metric payloads as Sentry metrics. The options are experimental, so treat them as a trial before you rely on them.
Data Points to Track
diagnostic_report_type(memory exception, hang, CPU exception, disk write, launch)memory_exception_countper release and per daypeak_memory_mband the memory limit reported with the diagnosticos_version, so iOS 27 devices are separated from older onesdevice_modelanddevice_memory_gbforeground_state(foreground, background, extension) when the exception happenedscreen_nameor last known route before the exitapp_versionandsdk_versionenabled_report_typesas a release property, so you know what was switched on
Setup Steps
- Upgrade Sentry Cocoa to 9.32.0 or later.
- Choose reports. Set
enabledDiagnosticReportsto the diagnostics you will act on. Fewer types means less noise. - Decide on metrics. Turn on
enabledMetricReportsonly if you want MetricKit numbers in Sentry metrics. - Tag the build with the enabled report types so you can compare releases fairly.
- Test on iOS 27 hardware or a beta device. Memory exception diagnostics need iOS 27 and later, so older devices will not send them.
- Build a dashboard of memory exceptions per 1,000 sessions, split by device memory.
- Alert when the rate rises above your last stable release.
Actionable Insights
Start with the ratio of memory exceptions to sessions. A flat count can hide growth if your user base is growing, so always use a rate. Then split by device memory. If only low-memory phones are affected, your app probably holds too much in memory at once, for example full-size images or large cached lists.
Next, look at the foreground state. Exceptions in the background point to work that continues after the user leaves, such as sync jobs. Exceptions in the foreground point to a screen that loads too much.
Compare each release with the last. A new feature that raises peak memory is easy to find when you have the release tag and the screen name side by side. Remember that MetricKit data arrives in batches, usually the day after the event, so judge a release after a full day or two rather than after an hour.
Finally, keep an eye on volume. Enabling every diagnostic type can create a lot of events. Start narrow, confirm the signal is useful, then widen.