sending sms from iphone with http links - ios

Is there anything special I need to do when sending http links as part of sms message from IOS programmatically?
When I send a message that includes a link http://echowaves.com/mobile?token=123123 the first part of the link shows as a link, but everything after ? (including ?) shows as a plain text. So when the link is clicked the token parameter is not included. I thought, maybe there is a problem with SMS client that does not know how to parse the links, but the same exact behavior is experienced in IOS as well as on Android. Also, when I try to send the SMS message and manually type the link with parameter -- it get's interpreted properly when received.

Wacky,
just retyped the whole string manually by hand -- and it works. Perhaps some special character or encoding was getting on a way after copy paste string around.

Related

Twilio issue when sending message with German character

I'm using Twilio to send an SMS message. However, the message is not displayed properly on the mobile devices with German text. For example, the message is "Grüße" but the character "ü" and "ß" is not displayed correctly like this:
The issue happen on both Java SDK and cURL with REST. Is there any solution for this?
Open a ticket via the Twilio console to report this issue, along with the Messaging SID(s) experiencing the issue, so they can determine what is causing the problem.
Also, indicate your troubleshooting steps above (Java/cURL), which is important information as well.

How to send a link in an SMS so that the preview is loaded automatically?

I am using twilio to send SMS messages to phone numbers. What I am having problems with is making sure that once a user gets the message the preview of what is at a certain link actually loads in the message the user sees on the phone.
What is the proper way to send a link that automatically shows the preview?
EDIT:
I tried the open graph api. Apple does have a tech note on that. But, then, why does this link provided a proper preview in messages when I send this link to another phone? It works, and it does not use open graph.
https://i1.wp.com/www.asphaltandrubber.com/wp-content/uploads/2017/11/2018-Ducati-Panigale-V4-29.jpg?ssl=1
a couple of things you can try
have the link at start of the message or end of the message
the link should be properly formatted with either http:// or https://
iOS uses The Open Graph protocol to support what image to show in the link . http://ogp.me/

Long URL isn't fully blue when embedded inside SMS text message

In our app, we use MFMailComposeViewController in order to generate and send an invitation message, containing some text and a deep link. Sometimes, when there is a network communication problem, the deep link can't be shortened. When this happens, after the recipient gets the invitation message, the link is broken:
I have no idea why it happens. Is there any way to fix this? By the way, if the recipient uses an Android device, the link is displayed correctly.

SmsMessage length calculator for iOS

In Android there is a great method SmsMessage.calculateLength you can give a string to it and it will detect its encoding and return an array where you can find how many characters are left for 1 sms message, or how many sms messages are there in the string...
I wonder if there is such a method in iOS? Sorry if the question is too simple, I am not a iOS guy.
No. The way you send a text message on iOS is by using the MFMessageViewController class, which presents its own UI, kind of like an activity on Android. It also shows the length of the message for you.
As there is no way to send a text message without using this pre-built iOS component, something like what you're asking for does not exist.

How to read a SMS in iOS and is it able to pass an string to the application via link in the SMS

do anybody know about how to read a SMS in iOS with Xamarin iOS ? and then I want to pass a string from that SMS to the application via link. For example when user click the link in the SMS it will pass a string value to the application and in the application a method is waiting to trigger that.
It's impossible to read incoming or storing SMS's due to iOS security restriction.
Although you can't directly intercept SMS messages, you can create a custom URL scheme so that if a user clicks a link in your message it will launch your app.
If Jason's answer of using a link to the app, there is an alternative. In my case a web service is sending down a code (two stage auth). When I know its going to be coming, I prompt the user to looks for it, and when it comes long press the message bubble, and copy the whole message to the pasteboard.
When the user switches back to my app, I've set a flag to look at the pasteboard, I see the message, extract out the code, and if it "works" the user can continue without further interruption.
Not as elegant as Jason's answer, but if you cannot control the sms content, its an option.
It is possible from iOS 12
textField.textContentType = .oneTimeCode
Please check this doc

Resources