TextField using numberPad shows incorrectly shows autofill for one time code

If I show a textfield in my app and set nothing else on it but the following, The keyboard will show an autofill suggestion from a password manager for a one time code.

textField.keyboardType = .numberPad

In this case, the text field is for typing in a count, so iOS suggesting to autofill a one time code is incorrect.

Setting textField.textContentType to nil has no affect on the behaviour.

Prerequisites to reproduce

  • an app with an associated domain
  • an entry in a password manager with a one time code for the domain
  • a textfield with keyboardType set to numberPad

This sounds like a bug on the system side. If you don't mind, please file a feedback report and share your report ID here for folks to track. Thanks.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

TextField using numberPad shows incorrectly shows autofill for one time code
 
 
Q