Audit App Capabilities Without A Device Model Allowlist
A new iPhone model is a good way to discover that a button really means “we recognized this model name.” It should mean “the requested operation is available in the current environment.”
Local authentication is a concrete example this September. Apple’s iPhone Duo announcement specifies Touch ID in the side button. An app that assumes every new premium iPhone should say Face ID already has the wrong abstraction, even before Duo’s October 23 availability.
Let’s audit an Unlock action using the authentication policy itself.
Ask about the operation, not the marketing family
LAContext evaluates local authentication policies. Its capability probe reports whether a policy can currently be evaluated; the result depends on more than which biometric sensor exists.
No enrollment, temporary lockout, and unavailable biometrics are different states. Keep enough information to offer the appropriate next action:
import LocalAuthentication
enum BiometricProbe: Equatable {
case available, notEnrolled, lockedOut, unavailable, otherFailure
}
func probeBiometrics(_ context: LAContext) -> BiometricProbe {
var error: NSError?
if context.canEvaluatePolicy(
.deviceOwnerAuthenticationWithBiometrics,
error: &error
) {
return .available
}
guard error?.domain == LAError.errorDomain,
let code = error?.code
else {
return .otherFailure
}
switch LAError.Code(rawValue: code) {
case .biometryNotEnrolled: return .notEnrolled
case .biometryLockout: return .lockedOut
case .biometryNotAvailable: return .unavailable
default: return .otherFailure
}
}
This function has no model-name lookup. Future hardware can use the same path if it supports the policy. Unknown errors remain a real failure category rather than being mislabeled as missing hardware.
Probe again when the person invokes the action or the app returns from a relevant settings change. A Boolean cached at first launch can become stale after enrollment or lockout changes.
Choose fallback as an app policy
An app may permit device-owner authentication with a passcode when biometrics cannot proceed. Another operation may deliberately require biometrics. That decision should remain visible in the policy:
enum UnlockRoute: Equatable {
case biometrics, deviceAuthentication, enrollmentHelp, unavailable
}
func unlockRoute(
probe: BiometricProbe,
allowsDeviceFallback: Bool,
canAuthenticateDeviceOwner: Bool
) -> UnlockRoute {
if probe == .available { return .biometrics }
if allowsDeviceFallback && canAuthenticateDeviceOwner {
return .deviceAuthentication
}
if probe == .notEnrolled { return .enrollmentHelp }
return .unavailable
}
The caller obtains canAuthenticateDeviceOwner by checking .deviceOwnerAuthentication on an appropriate context. The explicit allowsDeviceFallback value comes from your operation’s requirements. A failed biometric probe does not silently broaden the authentication policy.
For a permitted fallback, the UI can offer Unlock using device authentication. If the operation requires biometrics and enrollment is missing, explain that setup is needed. A lockout should not be described as a phone that lacks a sensor.
Capability is not successful authentication
A successful canEvaluatePolicy call does not unlock anything. Run evaluatePolicy for the selected policy, await its result, and handle cancellation, failure, and an environment that changed after the probe.
The actual authorization boundary must use that result and the data-access design appropriate to the feature. A screen-level Boolean is not a substitute for correctly protected data or server authorization. Keep this audit focused on availability and presentation; do not accidentally move a trust decision into UI code.
Include the required Face ID usage description when the app supports biometric authentication on Face ID devices, as Apple’s LAContext documentation specifies. Supporting Touch ID on another model does not remove that requirement from an app that runs on both.
Let the label follow the reported capability
If the button needs a biometric-specific label, read biometryType after calling canEvaluatePolicy. The reported sensor type does not establish enrollment, policy availability, or successful authentication.
Match Face ID and Touch ID explicitly and keep a generic Unlock label for an unknown future type. An exhaustive switch over known cases should still have a deliberate fallback as the SDK evolves. Do not label device-passcode authentication as Face ID merely because the hardware contains a face sensor.
Generic wording can be especially useful before the probe or while presenting fallback. Keep detailed failure explanations near the action where they help someone recover.
Apply the same separation to other features
The pattern has four inputs: whether the API exists on this OS, whether the hardware or selected format supports the operation, whether permission/policy allows it, and whether it is available right now.
A camera may support a control only in the active capture format. A new-window action may be unavailable in the current display presentation. A Bluetooth feature may require both phone and accessory support. A model-name list collapses these independent conditions and ages poorly.
Feature visibility for Debug, TestFlight, or App Store is another separate decision. Reuse a small Bundle app-configuration helper for that distribution policy; it should not pretend to detect hardware capability.
September 2026 verification: the pure policy fixture passed available biometrics, permitted and forbidden lockout fallback, enrollment help, unsupported hardware, and unknown failure cases. The LocalAuthentication adapter type-checked for iOS 17 with SDK 27.0. The fixture did not request authentication or test physical biometric hardware.