Skip to content

v2.9.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Aug 21:04
· 2 commits to main since this release

Full Changelog: https://github.com/jaywcjlove/PermissionFlow/commits/v2.9.0

Camera

Use this when requesting .camera or calling Apple's camera authorization APIs.

<key>NSCameraUsageDescription</key>
<string>This app needs camera access for video capture.</string>

For sandboxed macOS apps, turn on Camera, or add:

<key>com.apple.security.device.camera</key>
<true/>

Status is read with AVFoundation (AVCaptureDevice.authorizationStatus(for: .video)) via the optional PermissionFlowCameraStatus product. This pane does not support drag-to-list authorization—PermissionFlow only opens the settings page after the system prompt when needed.

import PermissionFlowCameraStatus

// One-time registration (e.g. in App.init)
PermissionFlowCameraStatus.register()

let provider = CameraPermissionStatusProvider()
let state = provider.authorizationState()
provider.requestAuthorization { state in
    // ...
}

Or register all optional providers at once with PermissionFlowExtendedStatus.register().

PermissionFlowButton(title: "Camera", pane: .camera)
PermissionFlowButton(pane: .camera)