I have an NSSecureTextField field in my MacOS app. I want to disable the password autofill option from coming up (the "Passwords..." button). How can I do this?
Disable password autofill in MacOS app
I have the same problem with my password manager app.
Setting the NSTextContentType to NSTextContentTypeOneTimeCode may help, although in my case this makes it only slightly less annoying. What is needed is a way to disable the behaviour completely. This is now available with UIKit on iOS (UITextContentTypeNewPassword).
I have a couple of NSSecureTextFields and they don't all behave the same way. Some heuristics are in play to enable the behaviour. Better documentation from Apple would be appreciated!
Setting the NSTextContentType to NSTextContentTypeOneTimeCode may help, although in my case this makes it only slightly less annoying. What is needed is a way to disable the behaviour completely. This is now available with UIKit on iOS (UITextContentTypeNewPassword).
I have a couple of NSSecureTextFields and they don't all behave the same way. Some heuristics are in play to enable the behaviour. Better documentation from Apple would be appreciated!
I provide a solution here. It is not pretty. But it works.