MFMessageComposeViewController attachments button disabled

Hello everyone! I was implementing a MFMessageComposeViewController to send messages. Currently I'm observing behaviour that attachments button is always disabled. But thing is that I'm showing MFMessageComposeViewController only when canSendText() && canSendAttachments() are true.

if MFMessageComposeViewController.canSendText() && MFMessageComposeViewController.canSendAttachments() {
    let composeVC = MFMessageComposeViewController()
    composeVC.messageComposeDelegate = self

    composeVC.body = "Test message"
    self.present(composeVC, animated: true, completion: nil)
}

I've checked that mms are enabled.

Are you programmatically adding an attachment or is your expectation to add this later? Have you tried adding the attachment with addAttachmentData or addAttachmentURL?

Do they return true?

Rico

WWDR - DTS - Software Engineer

Hey Rico! Thanks a lot for your response. Yeah, I've tried to add them with these functions, they are returning true. But my expectation was that user will be able to add attachments later. So these functions are not really good for my use-case :(

MFMessageComposeViewController attachments button disabled
 
 
Q