Skip to content

Commit 28dcb68

Browse files
committed
Handle the edge case where camera restrictions change while the app runs
1 parent ff360a4 commit 28dcb68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Authenticator/Source/TokenScannerViewController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ class TokenScannerViewController: UIViewController, QRScannerDelegate {
143143
showMissingAccessMessage()
144144
case .restricted:
145145
// There's nothing we can do if camera access is restricted.
146+
// This should only ever be reached is camera restrictions are changed while the app is running, because if
147+
// the app is launched with restrictions already enabled, the deviceCanScan check will retrun false.
148+
dispatchAction(.beginManualTokenEntry)
146149
break
147150
}
148151
}

0 commit comments

Comments
 (0)