From: Roopesh Chander Date: Fri, 7 Dec 2018 06:16:22 +0000 (+0530) Subject: Settings: Exporting configs as zip should open document picker X-Git-Tag: 0.0.20181104-5~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa9a4921a8f6ff337b89b89410a66784c04bb27a;p=thirdparty%2Fwireguard-apple.git Settings: Exporting configs as zip should open document picker Because: - Exporting UI should be consistent with importing UI - UIActivityVC takes a long time to open Signed-off-by: Roopesh Chander --- diff --git a/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift b/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift index 4c8c9a1..609fa2e 100644 --- a/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift @@ -80,11 +80,9 @@ class SettingsTableViewController: UITableViewController { ErrorPresenter.showErrorAlert(error: error, from: self) return } - let activityVC = UIActivityViewController(activityItems: [destinationURL], applicationActivities: nil) - // popoverPresentationController shall be non-nil on the iPad - activityVC.popoverPresentationController?.sourceView = sourceView - activityVC.popoverPresentationController?.sourceRect = sourceView.bounds - self?.present(activityVC, animated: true) + + let fileExportVC = UIDocumentPickerViewController(url: destinationURL, in: .exportToService) + self?.present(fileExportVC, animated: true, completion: nil) } }