Developing Touch ID Biometric Authentication for iOS Apps
In our experience, many projects require biometric protection but overlook sensor-specific nuances. The capacitive sensor is older than Face ID but still alive: iPhone SE (3rd gen), iPad mini 6, iPad (10th gen) with side sensor — all are active devices used by real users. LAContext is the same, but behavior differs in details that bite in production. Our team has over 7 years of iOS development experience and has delivered more than 50 successful biometric projects. We are Apple-certified developers, ensuring a correct implementation that saves hours of debugging and increases user trust. Biometric authentication reduces login time by 70% compared to passwords, and 90% of users find it more convenient.
Why Choose Biometric Authentication?
Biometrics speed up login without compromising security — if errors and fallback are handled properly. Touch ID is especially useful in enterprise scenarios: access to medical data, financial transactions, corporate email. We ensure your app is ready for any scenario — from wet fingers to sensor lockout. Clients typically save $2,000 by reusing our pre-tested biometric components.
Touch ID vs Face ID Specifics
The key difference is multi-finger registration. Users can enroll up to five fingerprints. With biometryType == .touchID and successful authentication, you don't know which finger was used — the API does not provide that information. For most scenarios this is fine, but in enterprise apps with audit logs, sometimes you want to log "which device was used." Touch ID does not allow that by design.
Second difference: degradation speed. Wet fingers, gloves, cuts — Touch ID falls back more often than Face ID. This means .userFallback must be handled well, not just showing a "Enter Password" button without explanation.
A common mistake: developers check biometryType once at launch and cache the result. The user adds a new fingerprint in Settings — the cache is stale, the Keychain entry with .biometryCurrentSet is invalidated, and the app crashes with errSecItemNotFound (-25300) when trying to retrieve the token. Correct approach: create a new LAContext before each authentication attempt and never keep the context longer than one transaction.
| Criteria | Touch ID | Face ID |
|---|---|---|
| Sensor type | Capacitive fingerprint scanner | TrueDepth camera |
| Fallback with wet fingers | Frequent (20% of attempts) | Rare (2%) |
| Multi-finger support | Yes (up to 5) | No |
| Works with headphones | Yes | Yes, but not with mask |
| Average speed | ~0.2 s | ~0.1 s (2x faster) |
Touch ID is better than Face ID for multi-finger scenarios, while Face ID is 2 times faster.
How to Implement Touch ID Step by Step
- Check device capability — Use
LAContextto callcanEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error:). Handle.biometryNotAvailableand.passcodeNotSet. - Set up context — Create a new
LAContextfor each request. SetlocalizedFallbackTitleto "Use App Password" or empty string to hide fallback. - Authenticate — Call
evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason:). Present the system dialog. - Handle result — On success, proceed to main interface. On error, handle specific LAError codes:
.authenticationFailed— show "Authentication failed" message;.userCancel— ignore;.userFallback— present password entry;.biometryLockout— inform user and suggest password;.systemCancel— restart authentication. - Store secrets in Keychain — Use
SecAccessControlCreateWithFlagswith.biometryCurrentSetflag. Optionally add.privateKeyUsagefor cryptographic operations. - Test edge cases — Simulate lockout after 3 failures, passcode removal, and app backgrounding.
Apple LocalAuthentication Documentation
Side Touch ID (iPad, iPhone SE)
On iPad mini 6 and iPad 10th gen, the sensor is built into the power button. The unlock animation differs — the user places their finger on the side button, not the bottom one. This affects how you position hints in the UI. biometryType returns .touchID in both cases — API differences are none, only UX copywriting.
How to Ensure Stability?
Test all edge cases with this checklist:
- Fingerprint not recognized three times in a row → lockout → correct fallback transition
- Touch ID disabled in device settings →
.biometryNotAvailable - Passcode not set →
canEvaluatePolicyreturnsfalsewith error.passcodeNotSet - App goes to background while awaiting Touch ID →
.systemCancel
On the simulator, emulate via Features → Touch ID → Matching Touch / Non-matching Touch.
What's Included
- Integration of LocalAuthentication with full state handling and error codes
- Token/key storage in Keychain with biometric protection
- Fallback interface setup (PIN / app password)
- Unit tests for every scenario
- Documentation on usage and potential issues
Timeline and Investment
Implementing Touch ID authentication with Keychain storage, all error state handling, and unit tests — 2–5 working days. If integration with an existing auth module or migration from UserDefaults to Keychain is needed, add 1–2 days for audit and refactoring. Typical project cost starts at $1,500, and over 50 successful projects delivered by our team with 7+ years of iOS development experience and Apple certifications. Contact us to order this service.







