Possible Duplicate:
How to programmatically send SMS on the iPhone?
Does someone have an idea how to send sms in iOS5 without using the default iPhone/iPad app? I mean in my app, I have a textbox and button. When I hit the button whatever string that the textbox contains will be sent to the specified recipient. Is it possible? thanks,,
It’s not possible – you have to use
MFMessageComposeViewController.Example of using
MFMessageComposeViewControllercopying your own text in there:where
yourTextFieldis aUITextFieldorUITextViewfor user input.Note you will also want to set the
messageComposeDelegate(probably toself) and conform to theMFMessageComposeViewControllerDelegateprotocol, in order to know when to dismiss it.