mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-20 13:26:03 +00:00
Add iOS Share Extension
This commit is contained in:
1 parent
13ce7522a7
commit
406247d968
13 files changed
+602
-147
No files matched your search
@@ -126,15 +126,14 @@ public class SaveFilesManager {
|
||||
#else
|
||||
|
||||
let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
|
||||
|
||||
if let documentsUrl = documentsUrl, let sharedUrl = URL(string: "shareddocuments://\(documentsUrl.path)") {
|
||||
if UIApplication.shared.canOpenURL(sharedUrl) {
|
||||
UIApplication.shared.open(sharedUrl, options: [:])
|
||||
}
|
||||
#if !EXTENSION
|
||||
if let documentsUrl = documentsUrl, let sharedUrl = URL(string: "shareddocuments://\(documentsUrl.path)"), UIApplication.shared.canOpenURL(sharedUrl) {
|
||||
UIApplication.shared.open(sharedUrl, options: [:])
|
||||
}
|
||||
else {
|
||||
showAlert(title: "CouldNotOpenDocumentsFolder", message: "CouldNotOpenDocumentsFolderDescription")
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user