When I use UIActivityViewController
to share a PDF file (or save it to the file system) the default file name is: PDF document
when saved to file or something like PDF document-3A147CA34B5F
when air dropped.
Is there a way I can change the default file name? Can I set the default folder when using "Save to files"?
I am using:
struct PDFSaveController: UIViewControllerRepresentable {
// https://stackoverflow.com/a/58341956/16675319
var activityItems: [Any]
var applicationActivities: [UIActivity]? = nil
func makeUIViewController(context: UIViewControllerRepresentableContext<PDFSaveController>) -> UIActivityViewController {
let controller = UIActivityViewController(activityItems: activityItems, applicationActivities: applicationActivities)
return controller
}
func updateUIViewController(_ uiViewController: UIActivityViewController, context: UIViewControllerRepresentableContext<PDFSaveController>) {}
}