import AVFoundation import CoreLocation final class ScannerView { let session = AVCaptureSession() let location = CLLocationManager() func start() { guard let device = AVCaptureDevice.default(for: .video) else { return } _ = device location.requestWhenInUseAuthorization() } }