]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Settings: Exporting configs as zip should open document picker
authorRoopesh Chander <roop@roopc.net>
Fri, 7 Dec 2018 06:16:22 +0000 (11:46 +0530)
committerRoopesh Chander <roop@roopc.net>
Fri, 7 Dec 2018 07:06:19 +0000 (12:36 +0530)
Because:
- Exporting UI should be consistent with importing UI
- UIActivityVC takes a long time to open

Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift

index 4c8c9a138f11888e8f66eec27e9d221f3206cdfe..609fa2e45d5a4f788d14aa1b42806b6d57416d82 100644 (file)
@@ -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)
         }
     }