TextMesh Pro - One Time Code (OTP) UITextField textContentType

We would like to make use of textContentTypefield of the UITextField class, our use case is verifying a user’s phone number by means of an SMS message. Apple provides a way of allowing a specially crafted SMS message following the OTP standard to be detected by iOS (12 and above) and gives the user of pasting that directly into a confirmation field (rather than typing it out). The Objective-C code would be:

singleFactorCodeTextField.textContentType = .oneTimeCode;

Further information can be found here: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_a_text_input_view?language=objc

From what I can see, this currently isn’t possible with TextMesh Pro, is that correct? If it is possible, could someone show me how to do it? Otherwise, could this be added, please? It improves the user’s experience.

1 Like

We are also trying to take advantage of that iOS feature, @scraft_vtime did you succeed in doing so?

Did anyone figure this out? I’m trying something similar