Improved type safety, local auth support, and better error handling

This commit is contained in:
2025-07-07 18:30:06 +03:00
parent cea23bb06e
commit bb3d349993
14 changed files with 556 additions and 576 deletions

View File

@@ -0,0 +1,15 @@
import Foundation
/// Errors that can occur during Keychain operations.
public enum KeychainError: Error {
/// Authentication failed, e.g., due to biometric or passcode denial.
case authenticationFailed
/// No item found matching the query.
case itemNotFound
/// Unexpected or corrupted data found in Keychain item.
case unexpectedData
/// An unexpected OSStatus error code returned by Keychain API.
case unexpectedCode(OSStatus)
/// A generic unexpected error, with optional underlying error info.
case unexpectedError(Error?)
}