Parse rule OTP from SMS iOS 12

As it became known, iOS 12 had the opportunity to provide the user with a one-time code from the incoming SMS, but nowhere was it said how the text is parsed in SMS. What is the rule for SMS parse?



I ask this question, because not every SMS with a one-time code is recognized as a one-time code. Sometimes a one-time code is defined as a telephone number and by pressing it appears an offer to call. 🙂


Thanks!

Replies

Seems you answered your own question in another forum ?


https://forums.developer.apple.com/thread/109637

No, I answered the question how to implement this feature. I am interested in another question, read carefully.

In other words, how to correctly write SMS text? What is the rule?

Interesting question. have you an example of incorrect SMS text ?

You're asking about iOS 12's 'Security Code Autofill'. See this video, for starters: https://developer.apple.com/videos/play/wwdc2017/206

Of course I have, but in Russian. Later I will try to simulate similarly in English.

Provide in russian, no problem.

For example:

SMS-code №1: 12345 - incorrect

SMS-code: 12345 - correct

Код подтверждения: 495450. Данное сообщение содержит конфиденциальную информацию. Никому не сообщайте полученные данные. - incorrect
Nikomu ne govorite etot SMS-kod: 0307. Perevod na kartu. - correct

From this example, seems to show that only ASCII printable characters can be used

(h ttps://www.rapidtables.com/code/text/ascii-table.html).


If that's the case, the following should be incorrect as well:

SMS-code: 12345 £

but the following should be correct

SMS-code: 12345 $

I think the problem is not in the ASCII characters. Because the following example is correct:
SMS-code: 12345 £

SMS-code: 12345 $

SMS-code: 12345 №


Is it possible to somehow call a Apple representative on this topic? In the video on this link, the speaker says that if something will work incorrectly, then let us know about it. It can be assumed that he already knew about some possible problems.

So that was a wrong guess.


Best then is to file a bug.

Hi,


I am also trying to find an answer to this question. What is the parse rules used by iOS 12 to recognise a one time code?


Did you ever figure this out @redisky or anyone?


Thanks