Enable save button when exporting a file to app folder in Files app

455 Views Asked by At

When I want to save a file to my App folder in iCloud, the save button is disabled, but it is enabled in other directories. Is there a way to enable it?

enter image description here

My code:

//...
let urls: [URL] = [fileURL]
documentPickerExporter = UIDocumentPickerViewController(forExporting: urls, asCopy: true)
documentPickerExporter.delegate = self
documentPickerExporter.allowsMultipleSelection = false
documentPickerExporter.modalPresentationStyle = .popover
    
present(documentPickerExporter, animated: true, completion: nil)
1

There are 1 best solutions below

5
On

You don't need / use the document picker for this. Save the file directly into your Documents folder. If you are sharing your files, your Documents folder is the folder that iCloud Drive displays as your "folder in the cloud".