send sms through programming in iPhone? [duplicate] - iphone

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to programmatically send SMS on the iPhone?
is it possible to send sms through programming in iPhone/iPod applications.

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.

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

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.

Related

Record the conversation of phone - ios [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is an iPhone Call Recorder theoretically possible?
I am an iPhone devleoper.
I want to record the conversation during phone call.
I don't know apple is allowing to do this or not.
If yes, than can anybody guide me how can i do this?
Basically In my app ,I am recording 1 audio .
Now when i call someone from my contact ,I want to play that audio as well as record the conversation.
Both play and record thing I want.
I am confused whether it is possible or not.
There is no public API for recording the calls made (or received) by the built-in Phone app.
You will have to implement your own phone calling mechanism. You'll probably want to use VoIP. (That is what Google Voice uses, for example.) You'll need to run your own server on the Internet, or contract with an existing VoIP service. You'll want to use in-app purchase to let the user buy minutes, because it costs money to run your own server or use a third-party service.
There is no public API for this. No app headed for the App Store can record phone calls made with the standard Phone app.

Mass texting - iOS

This is in regard to Objective-C in an iPhone app...
I have figured out how to get a list of all contacts on my iPhone, but is it possible to send out a mass text? I know I can make a message composer which has an array of recipients, but that will end up sending the text as a group text, not as an individual text to each person.
Also, is there a way to send a text message in iOS without using a message composer?
Most likely no, at least not without jailbreaking. This is the sort of thing that Apple wouldn't allow developers access to just to prevent any possible abuse by the same (especially when it might cost a user a small chunk of change if a mass-text got sent out).
MFMessageComposeViewController is your best bet. You'll be able to specify an array of phone numbers to send SMS to. As for group messaging, I would assume it would default to the users settings. (This is an option in Settings.app) It's simple enough to test but the documentation doesn't mention it.
http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html#//apple_ref/doc/uid/TP40009668

Is it possible to send mass texts using iOS?

I'd like to be able to send text messages in my app on iOS. I know that I have to use the MessageUI framework. My question is if it is possible to automate the process, of sending, say 100 text messages at once, while modifying the message ever
iPhone apps have absolutely no access whatsoever to SMS (without using private auto-reject calls), no sending, no intercepting received messages, no reading what messages on on the device. You can set up messages for the user to send, but you can't send anything automatically.
I wouldn't advise doing so.
But if you did, I would advise doing it through your own SMTP client, as opposed to using the Messaging UI.
SMTP is a very simple protocol, or you can use an existing library, like http://code.google.com/p/skpsmtpmessage/

Get content of SMS and email in iPhone?

I'm trying to implement an app that can read received SMS and email out. I mean convert the text content to voice. So I need to access to SMS and email first. As far as I know, there is no such API provided in the default SDK. Is there any other way to realize it?
Are the SMS messages stored in database(sms.db)? How to access to them? Is it only possible on jailbroken iphones?
And what about emails? Are they only stored in mail servers? How can I get them in my app?
Sorry for asking so many questions. I have spent many days on this problem, but havn't found any solutions...
You can't. According to the Device Features Programming Guide: Sending an SMS Message:
In iPhone OS 4.0 and later, you can send text messages from within your application. This feature is strictly for sending messages. Incoming SMS messages go to the built-in Messages app.
There are serious privacy and security concerns with enabling app access to emails and SMS, and I am glad Apple choose not to do it.
Yes, you can, (at least with SMS) but only in a jailbreak app (which you suggest is ok in your comments).
The sms.db file can be read by apps that aren't sandboxed.
See my answer to a similar question for how to get SMS content. That answer just shows how to get the most recent SMS, but if you just use the commented out while loop, you can iterate through all SMS.

Can I intercept SMS messages on the iPhone?

Can I intercept SMS messages on the iPhone? I would like to intercept messages and NOT have them display on the phone and then send out an auto reply. Is this possible in 3.x? Is it something they may alow in the future?
Nope. Nor is there a method of accessing already delivered text messages. (Even if you could, without background processing I'm not sure how your app would work anyway?)
While the OS stack might be locked down I wonder if it is possible to access the radio layer via serial and control local delivery by issuing GSM AT commands? I don't have access to an IPhone it may very well not be possible.