Problem with Runtime Permissions recordAudio

I’m having problems with RuntimePermissions::recordAudio.

If the user selects “Don’t Allow” when asked for permission to access Audio Input. then the app never can gain access to audio input again. This also counts for DemoRunner.

What happens, if the app does not have access to audio input, is that the app runs as normal but it gets not audio input. This might confuse the user not knowing what happens or what to do.

(I know that you can open System Preferences -> Security & Privacy -> Privacy -> Microphone -> and enable access. But how does the regular user figure that out ?)

In juce_RuntimePermissions.cpp it says:
"
#if ! JUCE_ANDROID // We currently don’t request runtime permissions on any other platform

                // than Android, so this file contains a dummy implementation for those.

                // This may change in the future.

"

BUT on Apples web page Requesting Authorization for Media Capture
it says:
" Always test the AVCaptureDevice authorizationStatusForMediaType: method before setting up a capture session
"

And I’m having problems that my macOS app gets rejected at Apple App Store Connect.

How do I “Always test the AVCaptureDevice authorizationStatusForMediaType: method before setting up a capture session test the AVCaptureDevice authorizationStatusForMediaType: method before setting up a capture session” from my .cpp code (I can’t objective-c) ???


Eigil