tags:

views:

546

answers:

3

is it possible to send sms through programming in iPhone/iPod applications.

+1  A: 

It is possible to initiate a sms message using the sms:<phone-no> URL. It is however not possible to fill in any content in the sms, nor is it possible to automatically send the sms.

More details are available in this Apple article.

Claus Broch
+1  A: 

There are two answers to this question: 1 - Not really. 2 - Of course!

Using OS3.x, you can sorta kinda almost do it. You can programmatically bring the user to the built-in SMS drafting application and you can pre-populate the "TO:" field. However, you cannot programmatically generate the message to be sent.

Using OS4.0 (currently in Beta) you can (according to these guys http://iphonesdkdev.blogspot.com/2010/04/mfmessagecomposeviewcontroller-sample.html) present a modal view of the SMS drafting application, or, rather you can show the user something that looks and behaves like the built-in SMS application without actually taking them out of your program (google MFMessageComposeViewController) and populate all of the fields... you can even provide more than one destination address for the SMS/MMS message.

That being said, there is no way of sending SMS messages without first presenting those messages to the user. At which point the user is free to either send them, not send them, or modify them before sending them.

Havok
+1  A: 

You can set the body in iOS 4. Please cf the documentation.

Adam Woś