I'm running a launch agent in a CI node. The agent is responsible for launching CI build/test jobs. The agent, being the responsible process, has been granted kTCCServiceScreenCapture
permission. With this in place I can run /usr/sbin/screencapture
during CI test jobs, archiving the visual state of the CI machine if a test fails, which makes it easier to diagnose why the test failed.
However with macOS 15 I get weekly/monthly notifications about the agent being able to record the screen.
The general advice for this is that apps should migrate to ScreenCaptureKit, but I'm using a built in tool in macOS, /usr/sbin/screencapture
, so how am I supposed to deal with that?