From 974b2568d2c48f6fb392f1b7b390a51a6a0fba64 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sun, 28 Oct 2018 23:32:15 +0530 Subject: [PATCH] QR code: Save the scanned tunnel --- .../WireGuard/UI/iOS/TunnelsListTableViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift index 6aaf8db..5d8646c 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") + } + } } }