aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-07 11:46:22 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-07 12:36:19 +0530
commitfa9a4921a8f6ff337b89b89410a66784c04bb27a (patch)
tree27e3a7b16c03f446818fbb2e62cdeabf97dea17e /WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
parentError handling: Use ErrorPresenter.showErrorAlert() instead of per-VC showErrorAlert() methods (diff)
downloadwireguard-apple-fa9a4921a8f6ff337b89b89410a66784c04bb27a.tar.xz
wireguard-apple-fa9a4921a8f6ff337b89b89410a66784c04bb27a.zip
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 <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift8
1 files 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)
}
}