From fa9a4921a8f6ff337b89b89410a66784c04bb27a Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Fri, 7 Dec 2018 11:46:22 +0530 Subject: [PATCH] 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 --- .../WireGuard/UI/iOS/SettingsTableViewController.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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) } }