-1

in my application I want to send predefine smstext to one single number on certain event , how to send sms like that?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Sukeshj
  • 1,503
  • 1
  • 19
  • 25
  • 2
    possible duplicate of [How to programmatically send SMS on the iPhone?](http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone) – Michael Petrotta Sep 29 '10 at 05:41

1 Answers1

4

You cannot send an SMS without user intervention. However, with the user's "approval" there are two ways to send an SMS from an iPhone application.

  1. Apple's MessageComposer sample project has code that shows you how to send an SMS using the MFMessageComposeViewController class.
  2. Alternatively, you can use:

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:1-408-555-1212"]];
    
rohan-patel
  • 5,772
  • 5
  • 45
  • 68
Kris Markel
  • 12,142
  • 3
  • 43
  • 40