Reputation: 4959
When tapping the "Passwords" button at the top of the keyboard for login/password Autofill, this warning prints to the console log:
Keyboard cannot present view controllers (attempted to present <UIKeyboardHiddenViewController_Autofill: 0x10a618e90>)
However, the Autofill view controller does present successfully after authenticating with FaceID/TouchID.
Why does this warning appear, and is there a way to resolve it?
Upvotes: 35
Views: 2969
Reputation: 185
Ensure the keyboard is dismissed before triggering any Autofill process
func dismissKeyboard() {
view.endEditing(true)
}
// Call this function before Autofill or other actions
dismissKeyboard()
if app frequently uses Autofill, consider disabling or adjusting the password autofill behavior
emailTextField.textContentType = .username
passwordTextField.textContentType = .password
Upvotes: 0