This is related to my post https://developer.apple.com/forums/thread/724698 where I submitted an issue that MetricKit reports didn't work for System Extensions on mac. I've come to realize that this is also true for Launch Daemons/Agents in the system domain (and so it probably also explains the System Extension case as I understand System Extensions are somewhat like Launch Daemons).
I have a "thin executable" (a Command Line Tool target) that registers with MetricKit reports and then just crashes itself. Here's the scenarios I've tested -
- If I launch this executable as the current user, I receive the crash reports from MetricKit.
- If I launch this executable as root, I also receive the crash reports.
- If I register it as a Launch Agent in a "user", or a "gui" domain, I still receive the crash reports.
- However, if I register it as a Launch Agent in the "system" domain, or as a Launch Daemon, I got this error from the
CrashReport
process.
<<bundle ID>> is not a MetricKit client
(I noticed the same error from MetricKit APIs in our system extension targets as well)
I decided to open this new post here, because the solution we were talking about in post 724698 - delivering metric reports from system extensions to their host apps -
may not apply here, since a Launch Daemon/Agent may not have a host app at all. What is the guidance if we want to receive these reports?