diff --git a/iosApp/iosApp/Login/LoginView.swift b/iosApp/iosApp/Login/LoginView.swift index d7827bf..56094ce 100644 --- a/iosApp/iosApp/Login/LoginView.swift +++ b/iosApp/iosApp/Login/LoginView.swift @@ -89,6 +89,7 @@ struct LoginView: View { .textInputAutocapitalization(.never) .autocorrectionDisabled() .keyboardType(.emailAddress) + .textContentType(.username) .focused($focusedField, equals: .username) .submitLabel(.next) .onSubmit { @@ -126,6 +127,7 @@ struct LoginView: View { TextField("Enter your password", text: $viewModel.password) .textInputAutocapitalization(.never) .autocorrectionDisabled() + .textContentType(.password) .focused($focusedField, equals: .password) .submitLabel(.go) .onSubmit { @@ -134,6 +136,7 @@ struct LoginView: View { .accessibilityIdentifier(AccessibilityIdentifiers.Authentication.passwordField) } else { SecureField("Enter your password", text: $viewModel.password) + .textContentType(.password) .focused($focusedField, equals: .password) .submitLabel(.go) .onSubmit { diff --git a/iosApp/iosApp/Register/RegisterView.swift b/iosApp/iosApp/Register/RegisterView.swift index dbdf164..dac5597 100644 --- a/iosApp/iosApp/Register/RegisterView.swift +++ b/iosApp/iosApp/Register/RegisterView.swift @@ -37,6 +37,7 @@ struct RegisterView: View { TextField("Username", text: $viewModel.username) .textInputAutocapitalization(.never) .autocorrectionDisabled() + .textContentType(.username) .focused($focusedField, equals: .username) .submitLabel(.next) .onSubmit { @@ -48,6 +49,7 @@ struct RegisterView: View { .textInputAutocapitalization(.never) .autocorrectionDisabled() .keyboardType(.emailAddress) + .textContentType(.emailAddress) .focused($focusedField, equals: .email) .submitLabel(.next) .onSubmit { @@ -60,7 +62,10 @@ struct RegisterView: View { .listRowBackground(Color.appBackgroundSecondary) Section { + // Using .newPassword enables iOS Strong Password generation + // iOS will automatically offer to save to iCloud Keychain after successful registration SecureField("Password", text: $viewModel.password) + .textContentType(.newPassword) .focused($focusedField, equals: .password) .submitLabel(.next) .onSubmit { @@ -69,6 +74,7 @@ struct RegisterView: View { .accessibilityIdentifier(AccessibilityIdentifiers.Authentication.registerPasswordField) SecureField("Confirm Password", text: $viewModel.confirmPassword) + .textContentType(.newPassword) .focused($focusedField, equals: .confirmPassword) .submitLabel(.go) .onSubmit { @@ -78,7 +84,7 @@ struct RegisterView: View { } header: { Text("Security") } footer: { - Text("Password must be secure") + Text("Tap the password field for a strong password suggestion") } .listRowBackground(Color.appBackgroundSecondary)