Skip to content

SwiftPackage, async-await and more..

Choose a tag to compare

@rushisangani rushisangani released this 13 Oct 14:44
· 1 commit to master since this release
e8694a4

What's new in version 4.0.0

  • async/await support - authenticateWithBiometrics and authenticateWithPasscode are now async throws and simply return on success. Completion-handler variants are still available, are called on the main actor and receive Result<Void, AuthenticationError>.
  • Swiftier names - authenticateWithBioMetrics is now authenticateWithBiometrics, isFaceIdDevice() is now isFaceIDDevice(), and AuthenticationError.initWithError(_:) is now AuthenticationError(_:).
  • Struct based, no singleton - BiometricAuthenticator is now a lightweight Sendable struct instead of BioMetricAuthenticator.shared.
  • Localized strings - All messages are looked up in your own bundle and strings table (.strings or .xcstrings), with built-in English defaults for any missing key.
  • More error cases - AuthenticationError now covers canceledByApp, invalidContext, notInteractive and companionNotAvailable, matching Apple's LAError.
  • Optic ID support for Apple Vision Pro.
  • AuthenticationError conforms to LocalizedError, so error.localizedDescription returns a readable message.
  • Swift Package Manager support with a privacy manifest (PrivacyInfo.xcprivacy), DocC documentation and unit tests written with Swift Testing.
  • Minimum deployment target is now iOS 15.0.

See Migrating from 3.x for API changes.