wireguard-apple/WireGuard/Coordinators/AppCoordinator+QRScanViewControllerDelegate.swift
Jeroen Leenarts 6cf4c49e21 Export qr scanned config to system settings.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-03 10:48:49 +02:00

18 lines
589 B
Swift

//
// Copyright © 2018 WireGuard LLC. All rights reserved.
//
import Foundation
extension AppCoordinator: QRScanViewControllerDelegate {
func didSave(tunnel: Tunnel, qrScanViewController: QRScanViewController) {
qrScanViewController.navigationController?.popViewController(animated: true)
showTunnelInfoViewController(tunnel: tunnel, context: tunnel.managedObjectContext!)
saveTunnel(tunnel)
}
func didCancel(qrScanViewController: QRScanViewController) {
qrScanViewController.navigationController?.popViewController(animated: true)
}
}