Why does the Apple-generated strong password autofill have no text?

372 Views Asked by At

When using Apple's text input to generate a strong password, my text field is empty when I tap on Use string password.

I'm using a UITextField with the content type of newPassword and everything works well, until I tap Use strong password from Apple's UI. When I do that, the input remains empty. It never actually shows the generated password.

1

There are 1 best solutions below

0
On BEST ANSWER

It was because on my UITextField .clearsOnBeginEditing was set to true. Whenever the text input became first responder it would clear the existing text, including the Apple generated strong password.

Not sure how to have .clearsOnBeginEditing and use a Apple generated password though.