Closed Album1993 closed 4 years ago
Hi the camera permission is out of date . the right one is blow
import AVFoundation internal extension Permission { var statusCamera: PermissionStatus { let status = AVCaptureDevice.authorizationStatus(for: AVMediaType.video) switch status { case .authorized: return .authorized case .restricted, .denied: return .denied case .notDetermined: return .notDetermined } } func requestCamera(_ callback: @escaping Callback) { guard let _ = Bundle.main.object(forInfoDictionaryKey: .cameraUsageDescription) else { print("WARNING: \(String.cameraUsageDescription) not found in Info.plist") return } AVCaptureDevice.requestAccess(for: AVMediaType.video) { _ in callback(self.statusCamera) } } }
Hi @Album1993, could you please update to the latest version of Permission ? Also I'm not sure what you mean by "the right one is blow" ?
Permission
Hi the camera permission is out of date . the right one is blow