aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift6
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) {