Check if email can receive iMessages - ios

You are able to configure your iPhone to be able to receive iMessages send to your email. Also iPod Touches and iPads can receive iMessages send to emails.
Given an email address is it possible to check, if this address is able to receive an iMessage?
Apple is doing this in the Messages app to change the send button color, I would like to implement something similar.

No, Apple have not released any API for iMessage. You can only check if the device can send an message, with MFMessageComposeViewController canSendText method.

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

How WhatsApp implements delivery receipts for messages pushed through Push Notifications in iOS?

An user X(Has Whatsapp in Android) tries to send a message to user Y(Has Whatsapp) in iOS when the user Y is offline. The user Y receives a push notification that he has a message from user X. As soon as the push notification is received, user X is able to see the double tick mark in his WhatsApp client. How WhatsApp is able to figure out that the push notification has been successfully delivered to the iOS client ?
It's not really possible to know what's going on without seeing at least a protocol dump of WhatsApp as this occurs, so on with the rampant speculation:
I'd guess that WhatsApp is using Message Delivery Receipts, which rely on the client responding to the message, rather than the server. Since push notifications talk to an intermediate service (e.g., APNS), which itself wouldn't send said receipt acknowledgements, the client running on the device, upon receiving the push notification, wakes up, analyzes the message, and sends the delivery acknowledgement to the initiator of the dialog.
At least, that's how I'd do it, if I were trying to leverage existing standards, which isn't necessarily what WhatsApp is doing.
Whatsapp uses XMPP, which is TCP based. Thus, if the Server is able to get a connection to Y this should ensure that the message has been delivered.
So if the whatsapp server is able to send the message to Y, the message is pushed out of the server. If Y has enabled the extension to send message states, Y automatically sends a repsone to X with the extension "delivered".
I can't really know, but i would say Whatsapp keeps a service in background that detects it. If i am correct, when you close totally the app (from multitask), and receive a message, the other person won't see a received double tick if you don't open the app.

Programatically send SMS in iOS without keeping any references in Message app

Need to send SMS programmatically in my iPhone app.But don't want to track SMS history in default message app(message in sent items).
Does any one has solution for this ?

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