Power & Performance Q&A - Apple Developer
ENDED | Power & Performance Q&A Connect with Apple engineers in the Power & Performance Q&A on the Apple Developer Forums. App & System Services General Questions Post Replies Boosts Views Activity What's the best way to get symbol files for system libraries, for symbolicating MetricKit call stack trees? I wrote a python script MXSymbolicate to symbolicate crash reports produced by MetricKit. To symbolicate a given frame, it needs the symbol file for that frame's library.
For system libraries, my system only has the requisite files on disk if I've plugged an iOS device of that type at that iOS version into my computer at some point (I assume these symbol files from the device are generated by Xcode when it's preparing to debug on a new device). All these different versions of the symbol files take up a fair bit of space on my machine over time, and it means the symbolication process isn't very portable.
Is there a better way to get ahold of symbol files for system libraries? Or is the expectation that we (as third party developers) only symbolicate the frames from our own apps? Topic: App & System Services SubTopic: General 3 0 292 Oct ’26 CrashReporterExtension runtime capabilities and limitations The documentation suggests that you can transfer files out of the crash reporting extension but it doesn’t outline if there are any gotchas to watch out for.
Are there any limitations to this? Does it have full network access? Are app groups and keychain groups fully supported? Does the extension have a memory footprint limit we should watch out for? What is the lifecycle of the callback, what Is a reasonable amount of time to plan our implementation to do its work and be done within? 10 seconds? 30? And so on. Topic: App & System Services SubTopic: General 2 1 745 Sep ’26 Understanding Crash Reporter Extension lifecycle and debugging behavior Hi!
I have a few questions about the lifecycle and capabilities of the Crash Reporter Extension. Besides using the corpsePort to inspect the crashed process through Mach APIs, is it safe/supported/recommended for the extension to access files in a shared App Group container? Are there any caveats or exceptions we should be aware of, for example around memory-mapped files, file coordination, or filesystem access after the host app has crashed?
Shall we use some particular APIs for this kind of shared resource or not? While debugging the extension, I noticed that when I trigger a crash in the app I am debugging, LLDB does not stop inside the extension (it also ends up stopping the debugging session). However, I can observe that the extension does run, because it writes data into a shared App Group directory related to the crash. Is this expected behavior? Is there a recommended way to debug the Crash Reporter Extension reliably (with lldb, or other way)?
More generally, I would like to better understand the extension lifecycle: When exactly does the extension start running? How long can it live after the app crashes? Is there a time limit for operating on the corpse process? Is the extension subject to resource limits similar to other app extensions, such as memory, disk, CPU, watchdog, or jetsam constraints? If the Crash Reporter Extension itself crashes, how can we detect that?
Would those crashes appear in Xcode Organizer, or is there another recommended way to observe them? Any clarification around the supported lifecycle, debugging model, and resource limits would be very useful. Topic: App & System Services SubTopic: General 4 1 715 Jun ’26 Diagnosing crashes reported in App Store Connect analytics My app's crash numbers in App Store Connect's analytics are higher than I'd like, but I'm having trouble figuring out where they're coming from.
In Xcode's Organizer, I see very low numbers of foreground crashes, and 95% of my background terminations are "System Pressure." So I have some questions about what's included in App Store Connect's numbers and correlating them with other signals: Do they include background terminations, or only foreground terminations? If they do include background terminations, do they include "File Lock" terminations (which I think largely means 0xdead10cc)?
If they do include background terminations, do they include System Pressure terminations? Are all the crashes included in App Store Connect's numbers also delivered to MetricKit as crash diagnostics? Is there documentation on what "System Pressure" terminations are? My understanding is that it's when the system kills my app to free up resources. Topic: App & System Services SubTopic: General 2 0 445 Jun ’26 Request for updated documentation in MetricKit and StateReporting The new MetricKit and StateReporting APIs look great.
The names of the Swift-first API conflicts with a lot of what I’ve written to do custom decoding (CrashDiagnostic —> MetricKit.CrashDiagnsotic and MetricKitModels.CrashDiagnostic). Job well done. Very clean API and reminds me of enum cases generated from Swift OpenAPI Generator, good stuff. Since there were no 1:1 labs this year for power and performance, I thought I’d send over my feedback for open discussion on the forums.
This post is mostly centered around documentation and clarification. FB23019810 - Multiple metric and diagnostic pipeline design. What is the recommended implementation if I have two destinations that want the exact same domain scope. Two managers? A single manager with multiple async streams? Some API like HealthKit recommend a single HKHealthStore, is there any downside to creating many managers, or conversely, creating many async streams for metrics and diagnostics?
FB23019316 - The new sample code shows mxSignpost. Is there any reason why we should not be using OSSignposter backed with a MetricKit OSLog handle? The API is more expressive and can handle wrapping closures P.S. see FB22413384 to hopefully enhance OSSignposter with an async func variant FB23020182 - MetricKit deprecations seem off and availability of the new API is missing from macOS and visionOS too. Can you clarify what the docs should show for deprecation?
Can you clarify what the docs should show for availability of the new API? FB23051890 - Regarding StateReporting, I understand there is a sanity limit for how one would slice up the metrics per the video commentary. Too many dimensions the data becomes hard to associate with actual improvements to be made. Is there a limit developers should stay clear of? When using the StateReporting API, what are the practical limits to the number of domains and metadata key/value pairs we can have?
FB23051980 - I’m excited and ready to implement StateReporting, in all the places. Is it supported in extensions? Will the resulting state changes be included in MetricReport? Last I asked, MXMetricPayload didn’t capture extension data. Will the resulting state changes be included in DiagnosticReport? I do see MXDiagnosticPayload come through containing extension data, so hopefully yes. FB23051678 - I didn’t catch any session or documentation material about the usage around the volatile metadata in the StateReporting API.
The docs state it is a fatalError to change the domain and stable metadata keys, that makes sense if that is how the composite key for uniqueness is being created. By the name volatile I assume it can, well change. What is the usage of the volatile metadata? What limitations exist around it if any? The ReportedState API doesn’t have any properties for volatile, is it meant to be received in reports? FB23051738 - There isn’t a StateReporting area path in Feedback Assistant.
For now sending feedbacks to MetricKit team, but it is a different framework. I assume other new frameworks are also missing I haven’t confirmed yet. FB13904761, FB13819435, FB13221143, FB22362800 - I have a handful of feedbacks that were reporting anomalous data with payloads. The routine with most bug feedbacks is to capture a sysdiagnose. Any tips on doing that when the repo
The rest of this page is on the live site.