iPhone - Send SMS message from within an app

Hi,

Is it possible to send an SMS message from within an app using Beta 3 of the SDK? What Framework are the messaging classes embedded in? Is it better to just link via a URL to the SMS application? A bit stumped on this one.

Cheers,

Stu

Mac Pro, Mac Mini (G4 and Intel), MacBook running, Mac OS X (10.5.2), as well as iPhone and Time Capsule

Posted on Apr 14, 2008 8:30 AM

Reply
45 replies

Sep 5, 2008 11:58 AM in response to jakarta08

Hi jakarta08,
Did you have any luck getting a good response from Apple engineers?

I need this desperately, but I couldn't get any further information from googling.
I also tried to send SMS directly thru /dev/tty.debug modem, but it failed with file permission issue.
If I need unlock iPhone for this approach, it cannot be used in my application for public distribution.
Did I miss anything here? Any comments will be appreciated.

Sep 5, 2008 12:11 PM in response to munggae

Let's be realistic - if Apple had wanted people to send sms messages there would be interfaces or a URL scheme. There is nothing the iPhone Programming guide nor in the Xcode reference docs. Even if you are able to somehow "crack it" I doubt your app would pass the scrutiny of Apple QA. It would be nice if it were possible but I would not pin my hopes on it, at least not for something you hope to sell through the app store.

Just my two cents...

Sep 5, 2008 12:13 PM in response to munggae

You can only launch the SMS app and specify the recipient, as indicated in a previous response. There is no way to specify text, nor is there any way to send an SMS message. I have to assume this is for security reasons, otherwise a malicious app could quickly run up your text bill if you don't have unlimited messaging or use your phone to send spam messages.

It would be nice, however, if Apple offered an API that handled SMS in a way similar to how they handle location requests (put up a dialog asking the user permission for your app to send SMS messages).

Sep 5, 2008 12:19 PM in response to Craig Patchett

Craig Patchett wrote:
You can only launch the SMS app and specify the recipient, as indicated in a previous response. There is no way to specify text, nor is there any way to send an SMS message. I have to assume this is for security reasons, otherwise a malicious app could quickly run up your text bill if you don't have unlimited messaging or use your phone to send spam messages.


What security risk? If the an SMS URI simply opened the SMS app, then no message is sent until the user tapped the Send button. The user is in total control.

That's how Apple handled the Email URI scheme: the URI simply passes the email address and message on to the Email app to create a new message. The message is not sent until the user clicks the Send button.

Sep 5, 2008 1:17 PM in response to munggae

Did you have any luck getting a good response from Apple engineers?

Nope! Haven't heard anything. And it's been a week now.
I think this is some 'special issue' we are talking about.
I don't know what the heck they intend.
It's close to embarrassing that this neat and state-of-the-art device called 'iPhone' everybody is talking about CAN'T prefill a SMS body.
And - the top of the iceberg - you can't send contact information via SMS.
If at least apple had integrated this!

This is a standard feature of all other mobile devices on the market!

The only reasonable explanation to me is:
Apple may not use this feature and may not support this feature with the SDK.
Reason for that could be that somebody has a patent for this and doesn't wanna let apple use it.

This is the only reasonable explanation that would make me understand why in gods name this omnipotent device doesn't support this trivial feature!

If any apple engineer is reading this:
Please let us at least know WHY! I think you owe us an explanation before some people run beserk after searching a fizillion webpages for answers.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iPhone - Send SMS message from within an app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.