aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift7
1 files changed, 6 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
index 6aaf8db3..5d8646c4 100644
--- a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
@@ -147,7 +147,12 @@ extension TunnelsListTableViewController: UIDocumentPickerDelegate {
extension TunnelsListTableViewController: QRScanViewControllerDelegate {
func scannedQRCode(tunnelConfiguration: TunnelConfiguration, qrScanViewController: QRScanViewController) {
- print("Scanned QR code") // TODO
+ tunnelsManager?.add(tunnelConfiguration: tunnelConfiguration) { [weak self] (tunnel, error) in
+ if let error = error {
+ print("Could not add tunnel: \(error)")
+ self?.showErrorAlert(title: "Could not save scanned config", message: "Internal error")
+ }
+ }
}
}