Biometría genérica (Face ID / Touch ID / Optic ID) y What's New 1.7.0

- AppLockService.biometryKind lee LAContext.biometryType; textos e icono del
  bloqueo y de la privacidad de saldos ya no asumen Face ID (Duo puede llevar
  Touch ID). Nuevas claves biometric_* en los 7 idiomas.
- Entrada 1.7.0 en el catálogo What's New (Duo, inspector, biometría) con
  strings en los 7 idiomas.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F1u4K16xy7eQVtgsYNZ9Vn
This commit is contained in:
alexandrev-tibco
2026-09-16 11:44:50 +02:00
parent 680255f69d
commit 6774d76146
11 changed files with 310 additions and 76 deletions
@@ -9,6 +9,7 @@ struct AppLockView: View {
@State private var errorMessage: String?
@State private var didAttemptBiometrics = false
@FocusState private var pinFocused: Bool
private let biometry = AppLockService.biometryKind
var body: some View {
ZStack {
@@ -28,7 +29,7 @@ struct AppLockView: View {
Text("Unlock Portfolio Journal to view your data.")
.font(.subheadline)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
.padding(.horizontal, 30)
@@ -36,13 +37,14 @@ struct AppLockView: View {
Button {
authenticateWithBiometrics()
} label: {
Label("Unlock with Face ID", systemImage: "faceid")
Label(String(format: String(localized: "biometric_unlock_with"), biometry.displayName),
systemImage: biometry.systemImage)
.font(.headline)
.frame(maxWidth: .infinity)
.padding()
.background(Color.appPrimary)
.foregroundColor(.white)
.cornerRadius(AppConstants.UI.cornerRadius)
.foregroundStyle(.white)
.clipShape(RoundedRectangle(cornerRadius: AppConstants.UI.cornerRadius))
}
.padding(.horizontal, 24)
}
@@ -56,7 +58,7 @@ struct AppLockView: View {
.font(.title3.weight(.semibold))
.padding()
.background(Color.gray.opacity(0.1))
.cornerRadius(12)
.clipShape(RoundedRectangle(cornerRadius: 12))
.focused($pinFocused)
.onChange(of: pin) { _, newValue in
pin = String(newValue.filter(\.isNumber).prefix(4))
@@ -78,7 +80,7 @@ struct AppLockView: View {
if let errorMessage {
Text(errorMessage)
.font(.caption)
.foregroundColor(.negativeRed)
.foregroundStyle(Color.negativeRed)
}
Spacer()
@@ -101,7 +103,7 @@ struct AppLockView: View {
} else if pinEnabled {
pinFocused = true
} else {
errorMessage = "Face ID failed. Please try again."
errorMessage = String(format: String(localized: "biometric_failed"), biometry.displayName)
}
}
}