7

I am making an iPhone app, where the requirement is such that user should be able to send SMS from iPhone app without going into the SMS API screen (i.e. the modal view for SMS).

We do not want the user to click the "Send" button. It should be sent automatically.

The message body and message recipients are pre-fixed.

I am a beginner. How can I do this?

halfer
  • 19,824
  • 17
  • 99
  • 186
Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216

3 Answers3

9

Your only option (if you want to submit to the App Store at least) is to use MFMessageComposeViewController. I think the idea is so that apps can't send SMS without the user's permission.

halfer
  • 19,824
  • 17
  • 99
  • 186
Stephen Darlington
  • 51,577
  • 12
  • 107
  • 152
  • 1
    Yep, that's exactly it. An SMS may attract charges and, on many networks, may be sent to a premium number to collect exaggerated revenue. Apple don't wish to expose their users to apps that can secretly charge money to their phone bill. – Tommy Dec 02 '10 at 11:42
  • There is this application called SmartSender which sends SMS from your phone without using the default interface, so there should be another way. (maybe create the composer but press the send button without showing it?) – htafoya Mar 05 '12 at 17:26
  • 3
    Minor late note: SmartSender is simply a reminder app, and definitely not sending SMS's unattended. Just dropping this here to help others to not waste time checking this angle out. – drew.. Mar 24 '17 at 16:12
0

See this Apple documentation: Sending an SMS Message section of System Messaging Programming Topics for iOS

Benoît
  • 7,395
  • 2
  • 25
  • 30
  • Please read the question. I dont want that the modal view for SMS should appear. I know MFMessageComposeViewController but it opens the modal view for SMS. So it is not useful. I want that SMS should be sent automatically without clicking "Send" Button – Parth Bhatt Dec 02 '10 at 11:37
0

No, you can not. If you can, there is a very serious security leak.

Tinyfool
  • 1,460
  • 2
  • 18
  • 40