HomeiOS Developmentswiftui - iOS TextField Robust password autofill, even when we do not...

swiftui – iOS TextField Robust password autofill, even when we do not need it


I’m utilizing two textField password & confirmPassword

My iCloud Keychain is turned On.

  @State non-public var electronic mail: String = ""
    @State non-public var password: String = ""
    @State non-public var passwordConfirmation: String = ""
   
    var physique: some View {
        ScrollView {
            VStack(spacing: 16) {
                TextField("E-mail deal with", textual content: $electronic mail)
                SecureField("Password", textual content: $password)
                    .textContentType(.password)
                SecureField("Password affirmation", textual content: $passwordConfirmation)
                    .textContentType(.password)
            }
            .padding(.vertical, 32)
            .padding(.horizontal, 16)
        }
    }

Once I faucet on the password safe subject, iOS present me the robust password view :

enter image description here

If I exploit this function, every thing is working superb, but when I faucet on “Different choices…” then “Select my very own password”:

enter image description here

The textfields are cleared (that is nice), but when I faucet on the e-mail textfield (or another textfields), the password safe subject is crammed with the robust password that I’ve simply stated I do not need…

Here’s a video :

enter image description here

I attempted couple of approaches like. first.contentType = .newPassword and second.contentType = .password or use .newPassword for each however doesn’t works.

Bug reference: https://developer.apple.com/boards/thread/716589

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments