A protocol-oriented Swift library for interacting with the iOS/macOS keychain with type-safe results.
Locksmith is a Swift library that provides a protocol-oriented wrapper for the Apple keychain, enabling secure storage and retrieval of sensitive data like passwords and tokens. It simplifies the complex keychain API while offering type-safe access to metadata and supporting all Apple platforms.
iOS, macOS, watchOS, and tvOS developers who need a robust, type-safe solution for keychain interactions without dealing with low-level Security framework complexities.
Developers choose Locksmith for its elegant protocol-oriented design that integrates seamlessly with Swift types, its comprehensive coverage of keychain features, and its elimination of manual type casting through strongly typed results.
A powerful, protocol-oriented library for working with the keychain in Swift.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables adding keychain functionality to existing Swift types by conforming to protocols like CreateableSecureStorable, allowing seamless extension of custom data models without boilerplate code.
Provides strongly typed results for keychain queries, such as returning LocksmithInternetProtocol enums and Int values for ports directly, eliminating manual casting and reducing errors.
Supports iOS, macOS, watchOS, and tvOS with a unified API, ensuring consistent keychain interactions across all Apple ecosystems without platform-specific tweaks.
Translates low-level keychain error codes into Swift-friendly LocksmithError types like .Duplicate or .NotFound, making error management more intuitive and aligned with Swift conventions.
Focuses primarily on generic and internet passwords, with the README noting certificates, keys, and identities as possible but not fully implemented, limiting use for advanced security storage needs.
The protocol-oriented design can introduce unnecessary complexity for basic keychain operations, where simpler wrappers or direct Security framework calls might be more straightforward.
Requires careful version management, as Locksmith 4.0 is Swift 4 compatible with older versions on separate branches, leading to potential breaking changes and migration effort during Swift updates.