Strong Password suggestion in iOS | SWIFT

This article explains how to enable strong password suggestion in IOS.

Abhimuralidharan
3 min readMar 1, 2019

This article is a short version of this WWDC video.

Please do read my article on password autofill before proceeding 🔥🔥🔥🔥.

From iOS 12, you might have seen iOS suggesting strong password while signing up for an app. This is a new feature in iOS introduced in WWDC 2018. I will explain how it works in iOS.

Image from WWDC video

How to enable strong password autofill in iOS?

Enabling this feature is easy. All you need to do is set the textContentType property to .newPassword:

newPasswordTextField.contentType = .newPassword

By default, the generated passwords are 20 characters long. They contain uppercase, digits, hyphen, and lowercase characters. This gives you a strong password with more than 71 bits of entropy. Apple designed this to be a strong, yet compatible with most services. It is, of course, possible for your apps to define their own custom password rules. As mentioned before, in most cases, you don’t need to do this…

--

--