Skip to main content

request_all_permissions

Function request_all_permissions 

Source
pub async fn request_all_permissions() -> RequestPermissionsResult
Expand description

Proactively request macOS TCC permissions for all four protected resources (M-PIX.9 of M-RECORD-EXPORT-REAL-PIXELS). Fires the OS-level prompts that register com.screen.app in the TCC database — without this, pickers enumerate empty on first launch because no entry exists yet.

Returns the status of each resource after the user responds (Authorized / Denied / NotDetermined). Blocks for up to ~30 seconds while the user clicks; returns the current status if the user dismisses without choosing.

Order matters: camera first (sync, quickest to dismiss), then microphone, then screen-recording via SCK (which fires its own prompt the first time SCShareableContent.current is called).