Attempt to Fix Blank Screen Issue for Some Users
• Add error and interruption monitoring
• Use AVCaptureSessionRuntimeError notification to capture specific session errors.
• Use AVCaptureSessionWasInterrupted notification to gain more insight into session interruptions.
• Introduce a dedicated serial session queue
Run all AVCapture calls on a dedicated serial queue to avoid blocking the main thread and potential performance issues.
Reference
• Address potential race condition in permission flow
Review and fix any race conditions during camera permission requests, which may affect older devices.
• Wrap configuration updates properly
Enclose session configuration changes within beginConfiguration() and commitConfiguration() calls.
⸻
Fix Torch-Related Freeze
Resolve the issue where enabling the torch (flashlight) causes the camera to freeze.