Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to attach Image with message via iPhone application?

I want to send message with image data. So I used MFMessageComposeViewController. But that controller provide only SMS service. So I used UIPasteBoard attached an image data. But It doesn't work, either. There are no "Paste" button created when typing messages. Attaching image at UIPasteBoard was clearly success. I think using MFMessageComposeViewController doesn't solve my problem. How can I accomplish my goal?

like image 452
huu Avatar asked Aug 26 '10 17:08

huu


1 Answers

This is not possible with the current MessageUI API: the MSMessageComposeViewController doesn't accept attachments like the MFMailComposeViewController does.

The only way to do this currently is to use an external service that allows you to send mms via a REST call for example.

GSMA defines a REST specification for exactly this purpose: http://www.gsmworld.com/oneapi/reference_documentation-version_1.html (multiple pdf's on this page)

Try to find a local service provider that implements this specification and you're good to go.

Just to add the direct wiki link to the OneAPI MMS spec: http://gsma.securespsite.com/access/Access%20API%20Wiki/MMS%20RESTful%20API.aspx and a link to the PHP/Java sandbox https://github.com/OneAPI/GSMA-OneAPI where MMS can be tested locally . Cheers.

like image 174
Joris Kluivers Avatar answered Oct 10 '22 15:10

Joris Kluivers