2

In my application, I want a user to input a phone number, press start, and then every 30 minutes that inputted phone number will receive a text message.

I know MFMessageComposeViewController can open up the text view controller to send a message with a specific body, but I want the message to be sent automatically. Any ideas?

Krunal
  • 77,632
  • 48
  • 245
  • 261
Eric Agredo
  • 487
  • 1
  • 4
  • 13

2 Answers2

4

Unfortunately, you can't do it without MFMessageComposeViewController. Apple won't allow sending SMS without user interaction.

I've alternate solution of this, out of scope of iOS.
Use web service API. Create a web service at server side that send a message to specific number(s) that accept numbers as parameters with request.

At specific time interval (according to your requirement) send a web service call with number as request parameter.

Web server can do it. It can send message to any device.

Krunal
  • 77,632
  • 48
  • 245
  • 261
0

The best method be to use a messaging service where you can send the submitted number to a server and handle the number from there. Apple doesn't allow you to natively send any messages without users interaction.

Larry Mickie
  • 441
  • 4
  • 9