Tracking your iOS app crashes, OOMs and other terminations with MetricKit

Baha Abisheva
3 min readOct 21, 2022
Photo by lilzidesigns on Unsplash

Before MetricKit

Tracking your app crashes and other terminations is vital for monitoring your app health. Before MetricKit iOS developers used to rely to 3rd party solutions to track any app crashes and OOMs. Crashlytics and Instabug are two of the most popular ones, but even they did not guarantee accurate OOM data. This is due to the fact that when an OOM happens, your app is killed by the system and there is no time for it to react or try to log the event. That’s why developers used to rely on various heuristics at the app start to determine whether an OOM happened.

Example checks from this article by the team at Compass in the image below.

https://medium.com/compass-true-north/the-case-of-ios-oom-crashes-at-compass-96ec812397e8

If that’s not enough, here is an interesting read on why 3p crash reporters are not a good idea.

With MetricKit

Apple introduced MetricKit in 2019 with iOS 13, but it did not have much to it at the time. With iOS 14 MetricKit received much more functionality. Now you can track diagnostic information about your apps terminations and crashes once every 24 hours at most. With iOS 15 this has…

--

--

Baha Abisheva

iOS developer. Writing about Swift, SwiftUI, general programming advice etc.