Crash and Hang diagnostics not returned on next launch in MetricKit (iOS 17.2 – 17.5)

The MXCrashDiagnostic and MXHangDiagnostic reports are not being returned via MXMetricManager on the next app launch in iOS 17.2, 17.3, 17.4, and 17.5. This issue prevents collection of crash and hang diagnostics through the MetricKit framework, which worked as expected on earlier and later (18, 26) iOS versions.

Steps to Reproduce:-

  1. Integrate MetricKit in an iOS app using:

MXMetricManager.shared.add(self)

and implement:

func didReceive(_ payloads: [MXDiagnosticPayload])

  1. Install and run the app on a device running iOS 17.2 or later.
  2. Cause a crash or hang scenario (e.g., dereference a null pointer or block the main thread).
  3. Relaunch the app after the system terminates it.
  4. Observe the callback for diagnostic payloads.

Expected Behavior MXMetricManager.shared.didReceive(_:) should be invoked on the next launch, returning diagnostic payloads that include MXCrashDiagnostic or MXHangDiagnostic objects.

Actual Behavior: No diagnostics are returned on subsequent launches. didReceive(_:) is not triggered, or the diagnostic payloads array is empty.

This behavior is reproducible across multiple devices and iOS versions (17.2–17.5).

iOS Versions: 17.2, 17.3, 17.4, 17.5 Devices Tested: iPhone 14, iPhone 15 Pro Xcode Version: 15.2 / 15.3 Framework: MetricKit Diagnostic Type: Crash and Hang

Thank you for the post and the detailed descriptions of the versions where the issue is occurring.

So MetricKit works well in iOS 26? Are you using Xcode 26.1? Do you have a focused sample?

May I request two things to resolve this issue?

  1. A focused sample that demonstrates the issue so that I can run and verify it.

If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

  1. File a bug using the focused sample with the description you provided against MetricKit?

Once you open the bug report, please post the FB number here for my reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

Albert Pascual
  Worldwide Developer Relations.

Crash and Hang diagnostics not returned on next launch in MetricKit (iOS 17.2 – 17.5)
 
 
Q