6

Possible Duplicates:
How to programmatically send SMS on the iPhone?
How to send SMS from an iPhone app without opening the SMS interface?

I need that my application could to send message automatically without the user interaction.

This is possible? I read something about smslib but is developed in java.

Is there any framework accepted by apple for to do this?

thanks for your time in advance...

Community
  • 1
  • 1
JoseMa
  • 107
  • 2
  • 5
  • 7
    Sending a message without user interaction is _very_ bad behavior! Just what sort of information are you planning to put in this message that the user doesn't know they sent?? Pre-populate a message all you like but don't _ever_ go behind the user's back! – theMikeSwan Jul 05 '11 at 19:40
  • 2
    why downvote? He asked if something was possible/acceptable and got told no, don't see anything wrong here. – Jesse Naugher Jul 05 '11 at 19:52
  • Hate those guys always downvote others' question. – Bagusflyer Oct 03 '14 at 02:10

3 Answers3

11

No, that's not possible. You have to use the MFMessageComposeViewController to get your application accepted by Apple.

Henrik P. Hessel
  • 36,243
  • 17
  • 80
  • 100
  • Hi Henrick - I agree this should not be done. I wanted to add to your comment though just incase you were not aware of SMTPSend. I am sending emails in the background (after a user fills out a form) in 3 of my apps that have been approved by apple. Happy Coding! – Louie Jul 05 '11 at 20:30
  • Thanks for all the answers... For to send email i am using the opensource classes of SKPSMTPMessage... My question is for the text message... In my app the user can define the recipients and the text message to send... and in one given time he can send the pre-definined text message... and in this moment i dont want thats appear the modal view of the iphone application. Is that possible? I was reading that in the older version of osx (until 3.0) that was possible and i dont know if now exist another methods... – JoseMa Jul 05 '11 at 21:14
  • Possible duplicate Question at http://stackoverflow.com/a/12054952/846372 – Soniya Aug 21 '12 at 12:35
2

You can't do that but you can prepopulate the email so they only have to press send. Have a look at the MFMessageComposeViewController.

BDGapps
  • 3,318
  • 10
  • 56
  • 75
1

Jose, I am HOPING that by "no user interaction" you mean the user does not need to see the MFMessageComposeViewController and actually push "Send" again.

In the event that you are having them fill out a form, and then click "Send" and wanting the app to actually send at that time without having to show the MFMessage Controller, then YES this can be done.

Take a look at my answer on a related question, it is the "accepted" one. Follow the steps and this will help you solve your problem. AGAIN, you should ONLY use this if the user knows you are sending an email, otherwise your app will be rejected.

Locking the Fields in MFMailComposeViewController

Good luck and happy coding!

Community
  • 1
  • 1
Louie
  • 5,920
  • 5
  • 31
  • 45
  • 1
    Thanks for all the answers... For to send email i am using the opensource classes of SKPSMTPMessage... My question is for the text message... In my app the user can define the recipients and the text message to send... and in one given time he can send the pre-definined text message... and in this moment i dont want thats appear the modal view of the iphone application. Is that possible? I was reading that in the older version of osx (until 3.0) that was possible and i dont know if now exist another methods... – JoseMa Jul 05 '11 at 21:09
  • @JoseMa: Did you find anything?.... Louie: Is it possible to send message automatically? not the email. – Ashok Jul 12 '16 at 17:21