MacosAudioPermissionManager

IMPORTANT: Add NSMicrophoneUsageDescription to your Info.plist (macOS).

Uses AVFoundation (AVCaptureDevice) to request/check microphone permission on macOS.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open suspend override fun requestPermission()

Suspends until microphone permission is granted or denied.

Link copied to clipboard
open override fun requestRedirectToSettings()

Opens System Settings to the Privacy → Microphone pane (best-effort). Note: Apple doesn't provide a fully stable public deep link; these are commonly used schemes.

Link copied to clipboard
suspend fun <T> withMicrophonePermission(block: suspend () -> T): T

Executes the block if the microphone permission is granted, otherwise throws an AudioPermissionDeniedException.