iOS: Fix share extension showed app introduction, share extension add cancel button, add browse button to settings

This commit is contained in:
Leon Böttger committed 2025-08-18 10:10:37 +02:00
1 parent 006f389891
commit 9d71ed35b7
4 files changed
+152 -14

No files matched your search

+15 -11
View File
@@ -124,17 +124,7 @@ public class SaveFilesManager {
NSWorkspace.shared.activateFileViewerSelecting(filesFinishedDownloadingSinceLastRun)
}
#else
let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
#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
openDownloadedFilesFolder()
#endif
// Clear the list of finished files
@@ -144,6 +134,20 @@ public class SaveFilesManager {
stopAccessingSecurityScopedResource()
}
public func openDownloadedFilesFolder() {
#if !EXTENSION
let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
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
}
public func stopAccessingSecurityScopedResource() {
guard let url = securityScopeUrl else {