Biometrics

Biometric authentication: Face ID, Touch ID, LAContext, fallback to passcode. Use when implementing app features related to biometrics.

abdullah4ai Updated

File contents

Biometrics

BIOMETRIC AUTHENTICATION (Face ID / Touch ID):

  • import LocalAuthentication; LAContext().evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics)
  • Requires NSFaceIDUsageDescription permission (add CONFIG_CHANGES)
  • Check canEvaluatePolicy first; fall back to passcode if biometrics unavailable
  • LAContext().biometryType to detect .faceID vs .touchID vs .none
  • Always provide manual unlock alternative (PIN/password)

abdullah4ai/apple-dev-docs/tree/main/swiftship/internal/skills/data/features/biometrics commit dc2b3fffb6

Frequently asked questions

npx skillmds@latest add abdullah4ai/biometrics-2