Note: This bug has been fixed in Xcode 13.0 beta 3
I am experiencing very odd behavior when trying to use multiple SecureFields when following a TextField in a view. Attempting to enter text in one of the SecureFields stops at one character with the field turning yellow and displaying "Strong Password", as well as duplicating in the second SecureField. This is occurring on iOS 14.2 in Xcode 12.2 on the Xcode preview and in the simulator.
Here is a minimal example that demonstrates the issue:
struct SecureFieldTestView: View {
@State var displayName: String = ""
@State var password = ""
@State var passwordVerifiation = ""
var body: some View {
VStack {
TextField("Display name", text: $displayName)
SecureField("Password", text: $password)
SecureField("Verify Password", text: $passwordVerifiation)
}
.padding()
}
}
struct SecureFieldTestView_Previews: PreviewProvider {
static var previews: some View {
SecureFieldTestView()
}
}
The console shows the following errors when running into the simulator:
[AutoFill] Cannot show Automatic Strong Passwords for app bundleID: <REDACTED BY ME> due to error: iCloud Keychain is disabled
[Assert] View <(null):0x0> does not conform to UITextInput protocol
I have tried to wrap the SecureFields into their own VStack{} and wrapping them all into a Form{}, but the issue remains.
Is there something obvious that I am missing or is this a bug in the SDK?
