In Beta version of iOS 12 I have observed it gives OTP(from SMS) in keyboard suggestion.
So is there any API which they have created for developers ? Or that would just
It is OS feature but you need to set UITextField's input view’s textContentType property oneTimeCode.
otpTextField.textContentType = .oneTimeCode
NOTE: Security Code AutoFill will only works with System Keyboard it will not work with custom keyboard.
When you get OTP it will look something like this: