b5853eee67e82e2f2b7e478b28e2a8b53ac66ef2
The feed stayed black even when the session reported running: the preview was a manually-framed sublayer (frame set in viewDidLoad/viewDidLayout, which raced the async permission callback and could end up zero-sized), and the session was configured across threads (addInput/Output on main, startRunning on a queue). Switch to the canonical AVFoundation pattern: the preview is now the view's backing layer (CameraPreviewView via layerClass), so it always fills the view with no frame bookkeeping, and all session configuration + start/stop run on a dedicated serial queue with delegate/state callbacks hopped to main. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Description
No description provided
2 MiB
Languages
Swift
100%