I’m trying to share an audio file (MP3) using UIActivityViewController
. While the audio file is shared successfully, the accompanying text message I’m adding does not appear in the message. It only sends the MP3 file without the text.
Here is the code I’m using:
let message = "some message"
let itemsToShare: [Any] = [message, mediaURL]
let activityViewController = UIActivityViewController(activityItems: itemsToShare, applicationActivities: nil)
activityViewController.excludedActivityTypes = [
.addToReadingList,
.assignToContact,
]
self.rootViewController?.present(activityViewController, animated: true, completion: nil)
How can I ensure that both the audio file and the text message are shared together, specifically for WhatsApp? Any help or suggestions would be appreciated!