didReceive(_ payloads: [MXDiagnosticPayload]) method not invoked when using Simulate MetricKit Payloads in Xcode 14.0.1

I want to obtain the hanging diagnostics for my app.

In order to simulate receiving them I use Debug > Simulate MetricKit Payloads in Xcode (14.0.1, 14A400), but the didReceive(_ payloads: [MXDiagnosticPayload]) method is not invoked. It works for the didReceive(_ payloads: [MXMetricPayload]) method.

Is this a correct behavior? If so, how can I simulate receiving the diagnostic payloads?

Post not yet marked as solved Up vote post of jonaszbilski Down vote post of jonaszbilski
1.2k views

Replies

@jonaszbilski

The expectation for an iOS device running 14+ (or macOS 12) would be that the diagnostic payload callback also gets invoked. The menu option is "Simulate MetricKit Payloads", payloads being plural. When I was learning the stack trace and other types I was doing so using the Xcode menu option for receiving diagnostics.

Since this appears to be a bug, I created a feedback against Xcode here: FB11840182 - "Xcode / MetricKit: Debug > Simulate MetricKit Payloads does not invoke the diagnostics callback as expected".

MBP 16 M1 - macOS Version 14.1 (14B47) iPad Air 3rd Gen - iPadOS Version 16.1 (20B79)

  • I got a reply back on my feedback that the team was unable to reproduce it but it still happens for me 100% of the time as of my testing on Xcode Version 14.2 (14C18).

Add a Comment