Skip to content

Commit 207802a

Browse files
committed
Prevent the camera permissions alert from appearing in demo mode
1 parent 58886bd commit 207802a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Authenticator/Source/QRScanner.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ class QRScanner: NSObject, AVCaptureMetadataOutputObjectsDelegate {
9797
}
9898

9999
class func requestAccess(_ completionHandler: @escaping (Bool) -> Void) {
100+
guard !CommandLine.isDemo else {
101+
return
102+
}
100103
AVCaptureDevice.requestAccess(forMediaType: AVMediaTypeVideo, completionHandler: completionHandler)
101104
}
102105

0 commit comments

Comments
 (0)