1

Possible Duplicate:
How to programmatically send SMS on the iPhone?

I wanted to design an app that would send SMS messages to your contacts from within the app in the background. However, I cannot seem to find any tutorials on it and the Apple Docs arent anyhelp. I have also read somewhere that it is outright impossible.

But if so, how does the app, iDistress manage to do it? It send text messages from preselected contacts with a custom message : http://www.buzapp.com/idistress.html

Check out the screencast.

Thanks.

Community
  • 1
  • 1
Ali
  • 4,311
  • 11
  • 44
  • 49
  • 1
    See [How to programmatically send SMS on the iPhone?](http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone) – Matthew Flaschen May 24 '10 at 02:45
  • Talk about a feature ripe for abuse. There's a reason Apple doesn't allow you to do this directly. – ceejayoz May 24 '10 at 02:47
  • @ceejayoz: [It is avalible.](http://stackoverflow.com/questions/2894473/send-sms-from-iphone-app/2895975#2895975) – Emil May 24 '10 at 09:36

3 Answers3

3

Are you a registered Apple Developer? If so, you can use the 4.0 framework to show the composer window and set some of the values programatically inside of your app, without having to ever exit the app. However, you will have to wait until the new iPhone and OS4.0 comes out, roughly about June/July, to release the application.

Remember: you are not allowed to discuss details of iPhone OS 4.0 anywhere else than Apple's official Developer Forums, which you need to be a registered Apple Developer to access.

http://developer.apple.com/iphone/prerelease/library/documentation/MessageUI/Reference/MessageUI_Framework_Reference/index.html#//apple_ref/doc/uid/TP40008274

Emil
  • 7,220
  • 17
  • 76
  • 135
  • Thanks. Yes I am a registered Developer and will start going through the docs to get this in my app. – Ali May 24 '10 at 21:23
2

Direct access to the SMS and Email features aren't available in the official SDK. iDistress sends a request to a web service that they host (which sends out emails and text messages from their server)

rpetrich
  • 32,196
  • 6
  • 66
  • 89
  • Thanks for the reply. Can you send me a link of where you got this info? – Ali May 24 '10 at 05:04
  • 1
    It is available in iPhone OS 4.0. [See my post](http://stackoverflow.com/questions/2894473/send-sms-from-iphone-app/2895975#2895975) – Emil May 24 '10 at 09:35
  • Ali: there's no documentation in the 3.1 SDK on how to compose an SMS message ergo it is not permitted. It appears there is the ability to show the composer in 4.0 (thanks Emil). Direct access to send email/SMS without showing UI is not allowed, nor do I think it will be in the near future. – rpetrich May 24 '10 at 09:43
2

I've been looking for how to do this and was told it couldn't be done. Then today, I try this new app called Highlight, and sure enough, it does it. When you sign up, you pick contacts from your list and then the app goes straight to SMS and pastes in its own text as an invite message. What do they know that we don't know?

Erin
  • 21
  • 1