It seems that the modifier func suggestedFileName(_ fileName: String) -> some TransferRepresentation
can only set the filename for the entire Transferable type.
What I want is to set the filename for each instance.
Every instance of a Transferable type shouldn't have the same filename.
static var transferRepresentation: some TransferRepresentation {
FileRepresentation(exportedContentType: .myType) { myTransferable in
let url = try await myTransferable.exportedFileUrl()
return SentTransferredFile(url) /* maybe set the specific filename on SentTransferredFile? */
}
.suggestedFileName("Unnamed") // maybe this should be a fallback filename
}