diff options
author | Roopesh Chander <roop@roopc.net> | 2018-10-30 19:22:24 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-10-30 19:22:24 +0530 |
commit | e13bf133db27c9b64cf41de123bfcfbcd2649418 (patch) | |
tree | 4bebf7a307442ab990a13a585bc840195f800ae4 | |
parent | Style: Remove 'Based on' attributions (diff) | |
download | wireguard-apple-e13bf133db27c9b64cf41de123bfcfbcd2649418.tar.xz wireguard-apple-e13bf133db27c9b64cf41de123bfcfbcd2649418.zip |
QR code: QR code scanning is not available in the simulator
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift index 42ff8d2..209ada8 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift @@ -113,11 +113,17 @@ class TunnelsListTableViewController: UITableViewController { } func presentViewControllerForScanningQRCode() { + #if targetEnvironment(simulator) + print("Scanning QR code is unavailable in the simulator") + #else + let scanQRCodeVC = QRScanViewController() scanQRCodeVC.delegate = self let scanQRCodeNC = UINavigationController(rootViewController: scanQRCodeVC) scanQRCodeNC.modalPresentationStyle = .fullScreen self.present(scanQRCodeNC, animated: true) + + #endif } func showErrorAlert(title: String, message: String) { |