For OTP text field, I have set textContentType as oneTimeCode
if #available(iOS 12.0, *) {
otpTextField.textContentType = .oneTimeCode
}
I tried all sorts of content types to prevent OTP from being suggested on the keyboard, finally this one worked
if #available(iOS 12.0, *) {
textField.textContentType = .username
}
In this case the UITextField is capturing a pin, and also has
keyboardType = .numberPad
Although that may not make a difference