Search code examples
iosobjective-cswiftone-time-password

How to implement AutoFill OTP verification and Auto Proceed in iOS


I am trying to use Auto Fill OTP but it is not working. Anyone help me.

if #available(iOS 12.0, *) {
     otpField.textContentType = .oneTimeCode
}

Solution

  • If you've to implement AutoFill-OTP in iOS then it requires iOS 12 and above

    You've to set TextField ContentType to OneTimeCode as below image

    • Image

    enter image description here

    Note:- It only works when OTP message is included Code or PassCode keyword.