SmsMessage length calculator for iOS - 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.

Related

Apple messages auto-call

have an interesting problem I need to solve, I was hoping if anyone could give me some sort of an idea.
For example, if I get a text from someone saying (string) “URGENT” on my iPhone, I want to call them immediately.
So say I get a message, it could be any message but if their message says “urgent”, I need to call them ASAP, even when my phone is turned off.
Is there a way to do this, using API or anything?? I have no idea!!
Example say I get a messages saying:
Number 042XXXXX sends me a text:
"Hi Name, I have some urgent work for you"
Number 1300 XXX XXX sends me a text:
"Urgent help needed"
Both of these messages would be read by iPhone and their respective numbers would be dialled urgently.
Is there such a way to do this/automate this??
Any advice would be appreciated!!
I have no idea what to do, I am blank!!
I think the problem you have needs an indirect solution because, as Paulw11 points out, Apple don't allow you to inspect the message directly.
It would be possible to make use of Twilio's Programmable SMS API to setup a special phone number that customers could send text messages to. Then you use the APIs of Twilio to read the messages and then send an Apple Push Notification message for those the had "urgent" in the message.
You could then write an iOS app which receives push notification messages and takes the actions you desire. For example, it could present a screen which could automatically dial the number in question.

Is autofilling with sms code on iOS possible?

Is autofill sms code on iOS possible?
Hello, I am doing a research about autofilling fields with code received via sms.
With flutter package for android it works - when sms comes fields on screen automatically fill with it.
Fot iOS I see the code shows above the keyboard.
Is it possible to make it fill fields just like on android? Without need to show keyborad and press the code from it?
SMS autofill on iOS is done by iOS. Apps aren't involved. They can't see an incoming SMS and they don't see the code shown above the keyboard. It's not "autofill" in that it doesn't automatically type the number. The user must confirm it by tapping the code.
Most of the time, ios judges the best-suited number out of the sms, which it thinks is an OTP, and it's correct. Sometimes it fails, usually with money transaction via credit card, or if the OTP is not six digit.

iOS 12.2 Flash SMS (class 0) with sender and warning

We found that since iOS 12.2 if one send Flash SMS (class 0),
Uppers side contains our company's name (we send SMS a lot);
Second looks like iOS warning about SMS sender. How can we manipulate with it? Hide second warning?
I'm not sure if this would work can you wrap the code like a strand of DNA to hide it and put it back together after you are past what ever you are trying to get by in other words put send in one code with the other in parts and assemble it after just a thought

How can I intercept text messages using cocoa

I intend on writing an app for iOS that would require me to monitor incoming texts from select contacts etc - in short, I need to somehow get the strings from a text message into my app directly. Is anyone able to point me in the right direction here?
Apple doesn't provides any SDK (and doesn't allows developers) to access on the messages.
You can just access to the screen New Message from the app.

iOS: Retrieve Phone Number from Incoming Call

From what I can tell, this is not possible, but I wanted to ask in case there were any potential workarounds that have cropped up recently.
Ultimately, I want to programmatically send a message (of some kind) to whoever is calling (while my app is active).
Thank you for any help.
Not possible. Neither is programmatically sending a text message (assuming you mean sending a message from the user's phone).

Resources