diff options
author | Roopesh Chander <roop@roopc.net> | 2018-10-28 23:32:15 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-10-28 23:32:15 +0530 |
commit | e9d90a2f0d5477d8bb6eefb4d36efe7139f223cf (patch) | |
tree | 136436f1ad2016c7a04b0b3ea8f1d5cc9a6155b1 /WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift | |
parent | QR code: Ask for title when scanning a QR code (diff) | |
download | wireguard-apple-e9d90a2f0d5477d8bb6eefb4d36efe7139f223cf.tar.xz wireguard-apple-e9d90a2f0d5477d8bb6eefb4d36efe7139f223cf.zip |
QR code: Save the scanned tunnel
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift | 7 |
1 files changed, 6 insertions, 1 deletions
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") + } + } } } |