Skip to content

v0.3.0: Add a System Audio Recording permission (#5)

Latest

Choose a tag to compare

@piercefreeman piercefreeman released this 06 Nov 06:26
8415295
TrustMe covers Microphone and Screen Recording, but not System Audio
Recording, which a Core Audio process tap
(`AudioHardwareCreateProcessTap`) needs.

## Changes
- New `Permission.systemAudioRecording`, a drag-based permission in
`allDraggable`. It opens `Privacy_AudioCapture` (the System Audio
Recording Only list in Screen & System Audio Recording) and reads the
`AudioCapture` TCC service.
- Before the app has been added or asked, `TCCAccessPreflight` answers 2
("would prompt") for this service. This permission reads that as
`.notGranted`. It reports `.unknown` only when TCC can't be read at all,
using the new `TCC.isAvailable`.
- The demo bundle's Info.plist gets `NSAudioCaptureUsageDescription`,
and the README tells apps to add it too.

## Testing
- `swift test`: all 85 tests pass.
- `TrustMeDemo --print-status` on macOS 15.7 reports
`system-audio-recording notGranted`.