From edcca91a523723e2aae9312757a184d0d14bb8df Mon Sep 17 00:00:00 2001 From: Oleg Date: Wed, 24 Jul 2024 15:44:21 +0300 Subject: [PATCH] MOB-2129 - Fixed occasional camera crash --- .../Modules/QRScanner/Views/QRScannerPreviewView.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unstoppable-ios-app/domains-manager-ios/Modules/QRScanner/Views/QRScannerPreviewView.swift b/unstoppable-ios-app/domains-manager-ios/Modules/QRScanner/Views/QRScannerPreviewView.swift index 83e5bf7f7..b82ff7c3e 100644 --- a/unstoppable-ios-app/domains-manager-ios/Modules/QRScanner/Views/QRScannerPreviewView.swift +++ b/unstoppable-ios-app/domains-manager-ios/Modules/QRScanner/Views/QRScannerPreviewView.swift @@ -199,7 +199,11 @@ private final class CameraSessionService { func setupCaptureSession() -> Bool { let captureSession = AVCaptureSession() + captureSession.beginConfiguration() captureSession.sessionPreset = .hd1920x1080 + defer { + captureSession.commitConfiguration() + } guard let videoCaptureDevice = AVCaptureDevice.default(for: .video) else { return false } self.videoCaptureDevice = videoCaptureDevice