3

I'm trying to allow the user to send multiple text messages in succession in a MFMessageComposeViewController, but if I don't dismiss the controller in the didFinishWithResult delegate method, the Cancel button in the top right corner becomes disabled, and the user has no way of getting out of the text message interface.

Is the MFMessageComposeViewController only for sending one-off messages?

func messageComposeViewController(controller: MFMessageComposeViewController!, didFinishWithResult result: MessageComposeResult) {
  if result.value == MessageComposeResultCancelled.value {
    self.dismissViewControllerAnimated(true, completion: nil)
  }
}

Thanks for the help.

maxstoller
  • 43
  • 3
  • I'm pretty sure that, as it's a requirement to present the message UI to the user each time, there is no supported way of sending multiple messages using MFMessageComposeViewController. – Gismay Oct 13 '14 at 17:42
  • @Gismay: Bummer! Do you know of an alternative? Thanks for the help. – maxstoller Oct 13 '14 at 18:01
  • You'd need to implement some kind of messaging server, i.e. not on the phone, that your app communicated with. You could look at services like Twilio for example, which provide messaging APIs, but at a price. – Gismay Oct 13 '14 at 18:21

0 Answers0