I am trying to use SwiftUI’s the .fileExporter
modifier with an item that confirms to the Transferable protocol
for multiple types like this:
FileRepresentation(exportedContentType: .pdf) { (item: MyItem) in
SentTransferredFile(item.webPDFPathURL)
}
This is how I use the fileExporter
:
.fileExporter(isPresented: $exportArchive, item: link, contentTypes: [UTType.webArchive, .pdf]) {
... handle errors etc ...
}
On macOS this gives me a save panel that lets me chose the type and everything works as expected:
However on iOS and iPadOS, I don’t get such an option:
Is this a bug or am I doing something wrong?