iOS 12 OTP keyboard suggestion

后端 未结 2 590
说谎
说谎 2021-01-26 06:14

I\'m trying to implement the transfer of a one-time code from SMS to the field above the keyboard, as in the image.

But for some reason the field above the keyb

相关标签:
2条回答
  • 2021-01-26 06:27

    Okay. This is what I could find out. Regarding the code, it is enough that I described above. Additional settings on the client is not required. But you need to pay attention to the text of the SMS message. As an example, I attached two messages.

    In the first message, our code is defined by the system as a phone number. We can even call it if we click on it. But why do we need to call a one-time code? :)

    In the second image, the code is defined as one-time, just what we need. If we click on it, the system will offer to copy it to the clipboard.

    What is the difference? Unfortunately, it is not completely clear by what rule the text is parsed in SMS. But we can check your text in the following way:

    If you set a property textContentType to your text field and nothing works for you, the first thing you need to check is whether the operating system determines the code correctly. To do this, simply go to the message application and check the code:

    1. blue font color with underscore - the system did not recognize one-time code.
    2. black font color (as default) with a gray underscore - it's okay!

    At the end, in the first case, you should check the text of the message for the contents of incorrect characters.

    PS Just a couple of examples of correct and incorrect SMS:

    • SMS-code: 12345 £ correct
    • SMS-code: 12345 $ correct
    • SMS-code: 12345 № correct
    • SMS-code №1: 12345 incorrect
    0 讨论(0)
  • 2021-01-26 06:35

    I got caught out by the fact "Autofill PAsswords" was turned off on the phone. It seems that it needs to be on for this functionaility to work.

    0 讨论(0)
提交回复
热议问题