@edorphy
I am facing an issue in logging metrics from Metric kit to my FileSystem. I was able to initially get metrics immediately for simulated crash or high CPU consumption situation. But not able to get the same for 24h cycle.
https://forums.developer.apple.com/forums/thread/765149
Can you share a snippet of how you have been able to do it from your end.
I have in initialised this metric manager instance in
didFinishLaunchingWithOptions
var metricManager: MetricManager?
final class MetricManager: NSObject, MXMetricManagerSubscriber {
override init() {
super.init()
MXMetricManager.shared.add(self)
}
deinit {
MXMetricManager.shared.remove(self)
}
func didReceive(_ payloads: [MXDiagnosticPayload]) {
for payload in payloads {
let data = payload.jsonRepresentation()
// Logging in File System
}
}
}
```
are you following the same process?