CameraPermissionManager
class CameraPermissionManager
A singleton class that manages camera access permission.
-
Singleton instance of CameraPermissionManager
Declaration
Swift
static let shared: CameraPermissionManager
-
Declaration
Swift
private(set) var cameraAccessGranted: Bool { get }
-
Private initializer to prevent multiple instances of CameraPermissionManager.
Declaration
Swift
private init()
-
Checks the camera access permission and invokes the completion handler with the result.
Declaration
Swift
func checkCameraPermission(completion: @escaping (Bool) -> Void)
Parameters
completion
A closure that takes a boolean value indicating whether camera access is granted or not.
-
Requests camera access permission and invokes the completion handler with the result.
Declaration
Swift
private func requestCameraPermission(completion: @escaping (Bool) -> Void)
Parameters
completion
A closure that takes a boolean value indicating whether camera access is granted or not.