Apple iMessage Extension API. Detecting whether recipient is using iMessage - ios

Is it possible to detect (programmatically), from an iMessage app extension: from the sender side: Whether the person you are talking to is using iMessage on their end, or they are an SMS/MMS user (Such as Android or Windows phone)
Basically I need to tailor my delivery experience based on whether they can render the fully rich experience, or a minimized subset of it.
For example, for iMessages, I actually want to deliver in-line video. For MMS/SMS, i maybe only want to show an Image only, or maybe even a Link only, to avoid the recipient's SMS/MMS charges.

No API is available for this. It's a really good idea though. I suggest you file an enhancement request with Apple. [Update: if anyone from Apple happens to see this, I've filed rdar://32773566 to request this.]
One possible workaround-- depending on how your app works with these videos-- is to upload the video somewhere and then send the URL as the message. On iOS, Messages.app will render a nice preview of most videos, if the sender is in the recipient's address book or the recipient has sent messages to the sender in the past.

Related

Whatsapp Media Messages

In the docs, it is mentioned that only during session images we can send media images. But I know some companies out there are sending media messages if no session starts. How are they doing it? Is there any workaround to send media messages without an active session?
Are there solutions from Twilio?
We refer to this feature as Media message templates. They allow for a variety of different use cases that expand what is possible with text-only messages and require pre-approval by WhatsApp and behave similarly to standard templates.
This feature is currently in private beta. So you can wait until it'll be released (I can't give you an exact timeline here) or ask to be included by opening a ticket with our Ops team (messaging-channels-ops#twilio.com).

How to send sms messages to be detected in iOS application

I want to be able to open my application or receive a notification when the app receives a text from a specific number.
For example, I want my application to check for this number: 301-212-1312
and every time a text from this number comes to my phone, i want the app to create a notification or open. And upon opening, it parses the information in the text and searches for a html or web link. That link is then displayed in a label to the user in the application.
Sample Text from 301-212-1312:
Hey can you help me with my code, I even tried searching for solutions on www.stackoverflow.com
Sample Application action:
Application opens, parses text from number and displays only the web link
Click here to go to page: www.stackoverflow.com
You won't be able to do this the way you want to. Apps in iOS are sandboxed, so they live in their own bubble and don't have access to other system events such as receiving a text from a certain number. Instead, what you would have to do is create a specific link that your app can open, and have that link deep link to your app (which is new as of iOS 9) be sent in your message. Think getting a message from someone that sent you from Floorboard, where you click on the link and it takes you to that story in the app, rather than their website.
Take a look to XMPP protocol, you can find some implementation from github
A definition from wikipedia
Extensible Messaging and Presence Protocol (XMPP) is a communications
protocol for message-oriented middleware based on XML (Extensible
Markup Language).1 It enables the near-real-time exchange of
structured yet extensible data between any two or more network
entities.2 Originally named Jabber,[3] the protocol was developed by
the Jabber open-source community in 1999 for near real-time instant
messaging (IM), presence information, and contact list maintenance.
Designed to be extensible, the protocol has also been used for
publish-subscribe systems, signalling for VoIP, video, file transfer,
gaming, Internet of Things (IoT) applications such as the smart grid,
and social networking services.

Sending text message SMS without user intervention

Is it possible to send sms via iphone without user intervention? I already know about MessageUI framework and MFMessageComposeViewController class, but this option requires user to click Send button when MGMessageComposeViewController is presented. I would like the device to automatically, without my help send a text message when certain conditions are met. (I have some sensors connected to the device)
No. You can only open a message ready to send but you cannot send it automatically.
If you want to be able to send sms without user's interaction, consider using some third party gateway. TextMagic provides nice api to send sms, but it is not free. At some point it charges you money. But, they have nice and simple api to use.
Look at this,
http://api.textmagic.com/https-api/textmagic-api-commands#send

How to receive sms on my ios app (workaround)?

I know i can't access the sms database of a ios device, but there's no workaround to achieve the same task using other tools?
My app must send an sms (which i do presenting the regular view of the ui message framework and asking the user to send it) and then receive a reply sms.
There's no way to receive this sms? There are online service or whatever can help me to do this?
No, the situation has not changed in recent years: there is no way to read any SMS (except if you're on a jailbroken device).
But one thing you can do is embed an URL in your reply SMS that the user needs to tap. You can then use an URL handler in your app to handle these. Like:
myapp://smsreceived?id=123&result=456
There's plenty of documentation on how to implement URL handlers.

How to get sms text from incoming sms in iOS

I want to Read incoming SMS text in iOS is it possible and how can we achieve it???,
It's already done in babel application at appstore. i am try to googling but, unable to find any piece of code how to do that? if you already known about that can you please share your knowledge.
No way Not Possible. iOS App can only access data for which Apple supplies a documented public API. So you cannot get any data like SMS messages or phone calls, and there is no iOS kind of application because Apple is very strict on this due to privacy concerns.
Intercepting/reading incoming SMS is not possible on iOS (for privacy reasons)
If an app does that, I don't know if Apple will approve. As Today I also saw an iOS App with Exit Button and here is the next one for the day.
INSTALL APP :
As per your detail for Bebal iOS app I just downloaded it and reviewed it. Here are the steps:
Enter Phone Number, No Verification message found. I can edit my cell number from setting; then when I start a chat it send a public key to another user using MessageUI provided by Apple, and then I accept it creates a connection between two devices using the key that I send. So after that, I can communicate with other through the Bebal app server.
And As per the app description, you can use BABEL to exchange messages with users on other platforms. Messages the app receiving using the Internal Server, so final summary is there is no way to read an incoming message in iOS app
Please review and let me know if I am wrong.
Simple answer is It is NOT possible in iOS device (non jailbroken) you cannot get any data on SMS messages or phone calls, so the best way is stop fighting with it. Not sure but it may achieve by jailbroken device.
Apple said - In iPhone OS 4.0 and later, you can send text messages from within your application. This feature is strictly for sending messages. Incoming SMS messages go to the built-in Messages app.
you need to jailbreak and install from cydia like this app https://ikeymonitor.com/download

Resources