Skip to content

Stale prompt fix, Face ID permission message and Swift 6

Latest

Choose a tag to compare

@rushisangani rushisangani released this 13 Oct 16:00
390408d

Fixed

  • Starting a new authentication invalidates the one still in progress on the same authenticator, which fails with canceledByApp, instead of leaving a stale LAContext that could loop or block retries (#46, #45).
  • biometryNotAvailable on a Face ID device, usually caused by denying the app's Face ID permission, now shows a Face ID message pointing to Settings instead of saying the device has no biometry (#40).
  • The library compiles in Swift 6 language mode.

Notes

  • Authentication runs on the main actor: call it from the main actor (for ex. a view controller or @MainActor view model) or await it. Availability checks, canAuthenticate() and error.message(using:) can be called from any thread.
  • Keep one BiometricAuthenticator per screen or feature and reuse it, so a new authentication can replace the one in progress.
  • New localization key faceid.not.available. Add it to your strings table to translate or customize the message; the English default is used otherwise.

Installation

Swift Package Manager:

.package(url: "https://github.com/rushisangani/BiometricAuthentication.git", from: "4.1.0")

CocoaPods:

pod 'BiometricAuthentication', '~> 4.1'

Full Changelog: v4.0.0...v4.1.0