Is there any API to check if app is authorized?

I'm developing an app which use "System Audio Recording Only" API to capture system audio. Is there any API to check if app is authorized? So I can instruct user to give my app with this permission.

Thanks.

Answered by Engineer in 790554022

The first time an app starts an aggregate device that contains a Core Audio tap, the system prompts the user to grant the app system audio recording permission. Please see Capturing system audio with Core Audio taps for detailed information.

The user can later revoke this permission in the System Settings. There is no API to determine whether an app still has permission to capture system audio. Please use Feedback Assistant to submit an enhancement request for such functionality.

In some situations, you might be able to detect if a tap is silent by measuring the loudness of the incoming buffers. If you are getting silent buffers, this could be an indication that the user might have revoked the app's permission to capture system audio.

Accepted Answer

The first time an app starts an aggregate device that contains a Core Audio tap, the system prompts the user to grant the app system audio recording permission. Please see Capturing system audio with Core Audio taps for detailed information.

The user can later revoke this permission in the System Settings. There is no API to determine whether an app still has permission to capture system audio. Please use Feedback Assistant to submit an enhancement request for such functionality.

In some situations, you might be able to detect if a tap is silent by measuring the loudness of the incoming buffers. If you are getting silent buffers, this could be an indication that the user might have revoked the app's permission to capture system audio.

Updating kAudioTapPropertyDescription will return kAudioDevicePermissionsError when System Audio Recording Only is disabled. That is the only reliable way I have found.

Is there any API to check if app is authorized?
 
 
Q