Sending SMS in background from iPhone 4 - iphone

I am creating an application that sends and SMS while taping on a button. To implement this functionality I installed the iPhone SDK 4. Since it supports in app SMS. But when I tap on my button to send SMS the MessageUI view controller is displayed along with my custom SMS body. I dont want to display this screen, I just need to send the SMS in the background with out displaying the SMS screen to the User.
Can any one help me in solving this.? Please help needed.
Thanks and Regards,
Shibin

I'm pretty sure there's no way to do this. Apple wants the user to confirm an SMS send for at least a couple of reasons:
SMS costs the user money to send
If your app could send without confirmation, you could spam contacts from the user's address book, or worse, give them a link to a phishing site that they trust because the text came from a trusted source
Why do you care if the user confirms the SMS or not? As soon as they tap "Send", the MessageUI view controller is dismissed and the user is back in your app's screen.
The only alternative I can think if is to send an NSHTTPURLRequest to a web service that provides an SMS gateway. That you could certainly do in the background, though likely you (the developer, not the user) would incur the cost of sending the messages, and the sender would not appear to be the user.

According to the official Class Reference provided by Apple, the composing message will always come up so that the user can confirm the message.

No, you cannot do that. There is a reason for that MessageUI controller showing - it's to confirm with the user that indeed the SMS is sent with her knowledge and understanding.

Without message body you can't send a message to the user. You want to send a message in background .Simply you refer the topic like web service, api reference .Its help you to send a message in background. hope this is helpful for you..

Related

send sms in the background programmatically in iphone using phonegap 2.9.0

I know we can use
MFMessageComposeViewController
to compose message and forward the SMS
My question is how can we send an SMS in the background ???
I am working on an application which has prefixed number of recipients and a fixed message body .
The user has to press a send button only once and this predefined message will be forwarded to all the recipients in the background .
The user should NOT be taken to messages application where he can edit the message body , add/remove recipients and then send the message
If there are any third party api then can they be used along with phonegap ?? and will the app be rejected ??
Kindly help !!!
Well, there is no documented solution. You may use undocumented approach, it is technically possible, but there is no way for You to AppStore then.
I only know native (ObjC) coding, not PhoneGap, but PhoneGap can't do more than native coding so I can tell you quite clearly that there is no way to send an SMS without opening the MFMessageComposeViewController. This is done to protect users from having messages sent without their consent. There is no way around this.

Is it possible to create an app that auto responds to phone calls with a text message, and auto replies to received texts and emails?

I have not been able to find any information about the topic online, so I am assuming it is not possible, but is there a way to create an app that when turned on will respond to all incoming calls by sending them to voicemail and responding with a text message? I know you can set the reply with message in iOS6, but we would want the message to be sent automatically when the call is recieved, currently the respond with message the user still needs to hit a button when the call comes in to send this. We would also want to respond to any incoming SMS/imessages with a text. As well as reply automatically via email to any incoming emails. If anyone could link me to an apple site or somewhere that says you can't do this? Thanks for your help.
Edit - is there any way to get information about notifications for these items? I was thinking if you can't directly handle the call itself, on a timed loop you could check to see if there were any missed calls or any info relating to those? Thanks
Not unless you want to develop and application for jailbroken phones, which will not be allowed in the Apple App Store.

How to know iphone auto sending sms?

programmatically send SMS on the iPhone with out show MFMessageComposeViewController? It's possible? b/c I want to konw when's my phone send sms. I don't want my phone auto sending SMS.
If it's possible, how to know? How to catch that event?
In theory (and assuming the phone is not jailbroken), you cannot send an SMS without user intervention. If sending SMS messages via the API, the user will see the message-compose view controller.
That said, I suppose an app could "bypass" this by sending an HTML request to a third-party SMS gateway (in other words, the iphone is not actually sending the text message, but an external server is).
It's possible, but not using the SMS capability provided by the phone. An app author wanting to send SMS without the usual UI would have to purchase capacity from some third party provider (search for 'SMS provider' to find many such providers). Messages sent that way would cost the app developer money, which is as powerful a disincentive as you can find. They also wouldn't be identified with you.

MFMailComposer send email without presenting view

I have created a sample iphone application , that sends an email to a particular user.The user address should be static.I am using MFMailComposer class to send an email from iphone.Its work fine.
Now i want to send email to user without presenting MFMailComposerView.Can we programmatically presses the MFMailComposer send button ?.So it will automatically sends an email.
Is this possible? If means how can i programmatically invoke the send button?
Plz help me?
Thanks in advance.....
Even if you could do this, it would very probably be thrown out of the app store or denied submission. For security reasons the user should ALWAYS be able to see email they are sending.
If you want to send data without the user seeing it, transmit the information to a server.
As others have already said, doing this is a very bad idea. This is technically possible though, see the e-mail section of Stealth Messenger.

Does Viber use MFMessageComposeViewController to send activation code to my iPhone

When you use Viber for the first time, it sends you an activaion code by SMS. I am working on the same action. After doing some research, (like "iPhone In-App SMS MFMessageComposeViewController Auto-Send" ), I have come to a conclusion but I'm not very sure it is correct. So I think some experts know the answer.
In iOS 4, we can use MFMessageComposeViewController to send SMS. However, the user will still see the SMS page and he/she needs to click 'send' button. In Viber, the user doesn't have to—he/she just gets a SMS without seeing the message page after he/she enters his/her own phone number. And all articles I read tell me iOS doesn't allow us to send SMS without user intervention.
I guess Viber has set up its own intermediate server that sends SMS. Is that correct?
Yeah, there are a number of web services that’ll send SMSs for you—Google ‘em. That’s most likely what they’re using; it’s definitely not the phone’s built-in SMS functionality.