How to send and receive text messages without MFMessageComposeViewController? - ios

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.

Related

iOS Twilio Receive Incoming SMS

I am developing an iOS messaging app that uses Twilio to send and receive SMS and MMS. The tutorial on Twilio about the iOS client seems to only cover outgoing and incoming calls. I understand that sending an SMS/MMS would mean that I send a HTTP request to my server, in which my server sends the request to Twilio in order to complete the sending. However, how would I receive messages on my app?
I know that Twilio numbers have web hooks that execute when the number receives this message, but how would I get this message to my app. I don't believe that there are delegate methods included like the voice ones. The only solution that I could think of right now would be to use push notifications from my server to the phone. Is there any other possible way? Thanks.
I was recently in a similar situation to yours, but my app only cares about receiving a response within a 2 minute window while the app is opened.
Regardless, I would say that your best options include 1) push notifications, 2) sockets (probably via Socket.io), or 3) background polling. If you plan to have your application receive the message agnostic of its state (open, closed, etc), then I would highly suggest using push notifications. I'm using Parse as my Twilio backend and it makes creating and working with push notifications a breeze :)

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.

Send background SMS without interaction

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.

Is it possible to implement an IMAP push client in iOS?

Would it be possible for me to implement a client that is capable of receiving IMAP push messages, without the awareness of the user (i.e. they are not displayed in an inbox etc.)
Yes. You can create a job (corn) to check for emails every few often and send a push message (apns) to the user (using your app) with the email message attached as body.

Resources