How to request permission for System Audio Recording Only?

Hi community,

I'm wondering how can I request the permission of "System Audio Recording Only" under the Privacy & Security -> Screen & System Audio Recording via swift?

Did a bunch of search but didn't find good documentation on it.

Tried another approach here https://github.com/insidegui/AudioCap/blob/main/AudioCap/ProcessTap/AudioRecordingPermission.swift which doesn't work very reliably.

Hello @yingzxu, thank you for your post. Please refer to the Capturing system audio with Core Audio taps sample code project. The system prompts the user to grant your app system audio recording permission the first time it starts recording from an aggregate device that contains a Core Audio tap.

How to request permission for System Audio Recording Only?
 
 
Q