Apple introduced an exciting new feature called Password Autofill in iOS 11. It helps you simplify the login and sign up process. When you try to login to a website or in an app, there is a prompt to autofill the credentials which are stored in the iCloud Keychain or any third-party password management app you have installed. The problem with this feature is that it cannot be turned off and it violates the DLP (Data Leakage policy).
Here is the code which lets you disable the feature. All you need to do is to extend the UITextField in which you want secure entry to BBDAutoFillBlockerField. The code implements custom secure text entry which “fools” the OS and the prompt to autofill doesn’t appear. BBDAutoFillBlockerField has the following features -
- text obscuring with bullets.
- copy/paste blocking.
- text autocorrection prevention.
- dictation and custom keyboards blocking.
- emoji prevention.