QR code: QR code scanning is not available in the simulator
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
@@ -113,11 +113,17 @@ class TunnelsListTableViewController: UITableViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func presentViewControllerForScanningQRCode() {
|
func presentViewControllerForScanningQRCode() {
|
||||||
|
#if targetEnvironment(simulator)
|
||||||
|
print("Scanning QR code is unavailable in the simulator")
|
||||||
|
#else
|
||||||
|
|
||||||
let scanQRCodeVC = QRScanViewController()
|
let scanQRCodeVC = QRScanViewController()
|
||||||
scanQRCodeVC.delegate = self
|
scanQRCodeVC.delegate = self
|
||||||
let scanQRCodeNC = UINavigationController(rootViewController: scanQRCodeVC)
|
let scanQRCodeNC = UINavigationController(rootViewController: scanQRCodeVC)
|
||||||
scanQRCodeNC.modalPresentationStyle = .fullScreen
|
scanQRCodeNC.modalPresentationStyle = .fullScreen
|
||||||
self.present(scanQRCodeNC, animated: true)
|
self.present(scanQRCodeNC, animated: true)
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
func showErrorAlert(title: String, message: String) {
|
func showErrorAlert(title: String, message: String) {
|
||||||
|
|||||||
Reference in New Issue
Block a user