Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS oneTimeCode not working on some devices

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

like image 434
Sovathana Lun Avatar asked Oct 22 '25 20:10

Sovathana Lun


1 Answers

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.

like image 116
jtouzy Avatar answered Oct 24 '25 09:10

jtouzy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!