Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
476 views
in Technique[技术] by (71.8m points)

ios - Native UITextField Secure Text Entry forces English (US) keyboard

I have a very simple login page (login + password).

My users are french, so their keyboard are French (azerty).

Since iOS 12, when they click on the password textfield, which is secured, the keyboard switches to English (qwerty), even if they do not have this keyboard installed on their devices. Moreover, if they do not have this keyboard installed, they can't switch back to their keyboard.

I found out that if I deactivate Secure Text Entry, the problem does not show up.

I also tried to set isSecureTextEntry programmatically, and the bug shows up.

I am adding two screenshots, one for each text field.

Thank you a lot for your time & help.

enter image description here

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have the same issue, in my case this bug appears only with a register screen.

The reason is that Apple checks the name of the class/func/parameter to determine (with heuristics) if it is a login/register screen and activate automatically autofill password. By replacing "register" with "Patate" in my code, the problem is solved.

I reproduce this issue with a sample app with 2 textfields (with a security text entry) and a view controller named "RegisterViewController". With a "PatateViewController", I have not the issue.

Moreover, I have this error in console : [AutoFill] Cannot show Automatic Strong Passwords for app bundleID: *** due to error: iCloud Keychain is disabled

Source : https://developer.apple.com/documentation/security/password_autofill

Hope you will find a better way than renaming your code.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...