From 77737a5ac7253a3335d5b27db87b184eba53d784 Mon Sep 17 00:00:00 2001 From: Oleg Date: Wed, 24 Jul 2024 15:47:45 +0300 Subject: [PATCH] MOB-2129 - Fixed occasional camera crash (#615) --- .../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