Sunday, July 21, 2024
HomeiOS Developmentios - Share Audio (MP3) to WhatsApp with textual content utilizing UIActivityViewController

ios – Share Audio (MP3) to WhatsApp with textual content utilizing UIActivityViewController


I am making an attempt to share an audio file (MP3) utilizing UIActivityViewController. Whereas the audio file is shared efficiently, the accompanying textual content message I am including doesn’t seem within the message. It solely sends the MP3 file with out the textual content.

Right here is the code I am utilizing:

let message = "some message"
let itemsToShare: [Any] = [message, mediaURL]

let activityViewController = UIActivityViewController(activityItems: itemsToShare, applicationActivities: nil)

activityViewController.excludedActivityTypes = [
    .addToReadingList,
    .assignToContact,
]

self.rootViewController?.current(activityViewController, animated: true, completion: nil)

How can I make sure that each the audio file and the textual content message are shared collectively, particularly for WhatsApp? Any assist or solutions could be appreciated!



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments