Skip to content

Commit 075a70c

Browse files
committed
Check if simulator is running
1 parent 71d90a7 commit 075a70c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/Controllers/CameraViewController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ public final class CameraViewController: UIViewController {
250250
}
251251

252252
private func setupSessionOutput() {
253+
guard !isSimulatorRunning else {
254+
return
255+
}
256+
253257
let output = AVCaptureMetadataOutput()
254258
captureSession.addOutput(output)
255259
output.setMetadataObjectsDelegate(self, queue: DispatchQueue.main)

0 commit comments

Comments
 (0)