How send messages to the contact list numbers - iphone

I am working in new application and I am new to iphone.
I want to send a message to the person whom I have added from the contact list.
Is it possible?
Can you please give me some sample code or links.

For sending SMS through iPhone, it is required to have user authentication. So programmatically without and user interaction you cannot send an SMS
You need to see this to get a better idea:
How to programmatically send SMS on the iPhone?
also see:
MFMessageComposeViewController

Related

Send text message without show message composer or in bckground in iphone

Hi is it possible to send text message in background..?My new requirement is to send SMS if there is no internet connection .
I am trying MFMessageViewComposer but it shows the pop up view.
How can we send message without shown this pop up? Is there any other way to do this things.
It's not allowed. For example, what if I develop an app which send taxed SMS to a server of mine to get money ? That´s the main reason... I could also send innaproriate or SPAM SMS to random numbers...
That's why the user has to validate the sending.
Send SMS programmatically, without the SMS composer window hope that helps... Looks to be a similar question. According to the poster, ios6 does not allow you to send SMS in the background, without using a 3rd party API, like Nexmo, who provide a REST API to send messages using HTTP.
To send a message using Nexmo, just send a request like http://rest.nexmo.com/sms/json?api_key=n3xm0rocks&api_secret=12ab34cd&from=MyCompany20&to=447525856424&text=hello+hd1 and you'll get back JSON, change the endpoint to xml if you prefer that.

How to send SMS to more than one recipient with one time user interaction on iPhone?

Does anybody know, If it's possible, and how to send SMS to more than one recipient with one time user interaction. Which means, Our application should send SMS to a list of numbers with static message body when the user press the send button one time on iPhone?
Thanks
it is not possible as long as you don't use your own service to send SMS

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.

Sending SMS in background from iPhone 4

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..