3

onetimecode-screenshot

I tried to achieve the same as the above screenshot, but it shows sometimes, and sometimes doesn't.

Is there anyone who faced the same issue as me where iOS 12 or 13 doesn't show 2FA code from SMS on the keyboard.

in my code I set textField.textContentType = .oneTimeCode

also tried to disabled or enabled Password AutoFill in setting but still not help.

I shall appreciate your help.

Thanks

Sovathana Lun
  • 31
  • 1
  • 4

1 Answers1

3

Maybe a little bit late but, you have to check this setting on your non-working devices :

  • Settings
  • Passwords & Accounts
  • AutoFill Passwords

If it's disabled, Apple will not read your messages on your .oneTimeCode fields, and they will not be displayed above the keyboard.

jtouzy
  • 1,499
  • 1
  • 10
  • 17