Sending SMS from iphone application to user - iphone

i am creating an application where user will find the deal and if he want to receive the deal detail by sms or email.
how user will get sms and mail from my application without using web service if any sample code is available then please help me.
Thanks in Advance

For mail you can check out this: MFMailComposeViewController and its delegate MFMailComposeViewControllerDelegate.
Documentation here:
https://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html
For sending SMS, MFMessageComposeViewController.
Documentation here:
https://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html

Apple provides MFMessageComposeViewController which can be used to send SMS too. This article should solve your problem - How to Send an SMS Progammatically in iOS

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.

How to send mail without showing the mail composer view

I am developing an iPhone application in which I have to send mail to only recipient without showing the MFMailComposer UI view (i.e without user interaction). Can please tell me how to achieve this?
You cannot send Email without user acceptance. But there are a lot of web-services in internet which can send Email. I guess some app uses those services or uses own.
See also How can I send mail from an iPhone application
You can also use the gmail mail facilities into the xcode
For that following to gives much more tutorial and source code here
Reference link
Using openURL method of UIApplication, you can send the mail without using mail composer. For that you should select "mailto" option.

sms access project

i was searching on the net for a method which can inform an incoming message on receivers phone.
but everyone said it is not possible
but there is an app. which is approved from apple
here is the url
http://itunes.apple.com/us/app/tigertext/id355832697?mt=8
if i am not wrong this is doing similar kind of work...(i.e. accessing incoming sms)
please reply i am waiting...
and sorry if i am wrong about the working of that app...
This is not sms, but an alternative chat protocol, most probably using the push notification service.

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

how to send SMS/Email from an application

first of all thanks a lot to all of you for past valuable suggestions,we are creating an application where on certain events wants to send email/sms to specified phone number we already tried with the openURL call but it opens the existing inbuilt email/sms application of the iphone.Our requirement is to send sms/email without opening the inbuilt iphone email/sms application is it possible if yes what are the supported API's to achieve it.
thanks in advance.
You can do this with a short code by way of a SMS/MMS aggregator like OpenMarket or as another person has posted you can use the SMS Gateway but this requires the knowledge of the end users carrier name. If your replying to a SMS on the iPhone I believe you can use the API which in turn would give you the carrier id of the incoming SMS message you would like to reply to.
Maybe you could explain your problem a little more so we can better grasp your question.
You can see my other answer from a similar question. Basically you can send an email to the phone if you know the provider. The provider will then format the email into a SMS message.