Send background SMS without interaction - ios

I want to send a background SMS in iOS 7, and i dont want user to have to interact with any front end view. How can i do this ?
I will use this application for myself (no app store), so private api allowed .

With MFMessageComposerViewController it is not possible to send without user interaction. You have to take SMS gateway and implement your own way of sending SMS, than only it is possible. Like you have to create webservice and accept parameters from iPhone like phonenumber and message and than send SMS using SMS gateway.
Hope this helps.

Related

Is it possible to receive SMS notification inside an app in IOS?

Consider 2 iOS phones running an app.
The app in one phone sends a SMS to the other phone. I want to know two things.
Is it possible to show a notification inside the same app in second phone when this SMS is received.
Is it possible to receive this SMS only inside the app ie, this SMS should not go to the default iOS message inbox.
No, it's absolutely not possible without jailbreak.
iOS does not provide any public API to deal with SMS without going through the MFMessageComposeViewController.

How to send and receive text messages without MFMessageComposeViewController?

I want to send and receive text messages without showing MFMessageViewController from my application. Could anybody tell me how is it possible?
Not Possible , Unless you use 3rd party api for send/received sms.
you have to use Web service and Apple Push Notification Service for send message to other user without using MFMessageComposeViewController
You can't do it without MFMessageComposeViewController. Apple won't allow to send 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.

How do I send an SMS on iOS without having to get the user to ok it?

How can I send a text message (natively or through the use of an API) from an iOS application to someone without having them have to interact with the message before hand?
The message would be prewritten and would send on tap of screen. Its ok if the user needs to okay it once, but I need a way to send a message without having to have the user interact with their device each time.
Example:
Phone is off, I shake phone, phone senses shake, sends text messaging saying "I'm shaking" to another user via SMS or MMS without having the user need to OK the sending. Is this possible? How would I do it?
You can't do that. You need to show the user the message in the MFMessageComposeViewController that pops up first, and he has to send it by himself.
This restriction was made, because otherwise, many apps could spam your contacts etc. with a massive amount of sms or they could even write sms to expensive numbers.
But if you want to send just some kind of notification to another user, you could use push notifications. To do that, I would recommend you to use parse.com and their free push notification-service. Also, because Push Notifications are free, in contrast to SMS, you will save a lot of money. Of course you need to make some preparations before you can send notifications, but that way you could do it. But also there are restrictions. One restriction is, that the receiver of the notification also must have the app installed on the receiving device.
So the receiver would receive a "message" like that:
So I would recommend you to check the QuickStart Guide from Parse.com for iOS for further informations. The Guide is really simple and shows you step by step how to activate your app for Push notifications.
Sorry, but you can't, it is completely impossible. The only way to send sms is through messageUI, which always requires the users consent. You can probably do it on a jailbroken phone, though.
Yes, it is possible. But you would have to use a 3rd party service to send the text message. for example, Twilio.

ios: How to send SMS in background

I know How to use MFMessageComposeViewController to compose message and forward the SMS and I want to send SMS in background without displaying message composer view. so If I click on button SMS will send in background without prompting to user.
There are 3rd party API's like Twilio, nexmo and tropo but i am not getting how to implement with those API's.
There is any other way to send SMS in background?
Using the standard API's you can only send an SMS with user interaction.
You can't send SMS or e-mail without user interaction unless there is any server interaction. If you really want to send SMS in background, send the content and reciepients to your server in background and from the server side you can send SMS to your receipients.

Sending SMS inside my App

I use MFMessageComposeViewController to send SMS inside my App. Is there a way to know if the message was sent using iMessage or regular cellular services?
No. You do not even know if it was sent out at all. I wish there was such feature in iOS SDK.

Resources