Keychain for iOS

Keychain is a wrapper library built around a small subset of features offered by Keychain Services to simplify saving and retrieving data to and from the iOS Keychain using kSecClassGenericPassword class.

While the Keychain Services offer comprehensive set of APIs and could be used directly, the app-side implementation for saving and retrieving data will most likely be verbose.

In a nutshell, to securely store an item using Keychain Services, a dictionary of predefined keys and values, also referred to as the keychain query, must be created first. This query must contain valid values for predefined set of keys that depend on a security class being used. To reduce the amount of manual work required to create a keychain query, this framework takes advantage of Swift features such as default implementation for protocols, generics and Codable for automatic encoding of models into external representation.

This approach leads to a much cleaner interaction with iOS Keychain that's enjoyable to use.

License: Apache 2.0

Language: Swift

Platform: iOS

Sponsored with ❤️ by Instabug
Instabug: Understand how your app is doing with real-time contextual insights from your users

Get all the logs you need and fix bugs, crashes, and other issues in minutes instead of days. With Instabug you will automatically receive device data, network logs, and reproduction steps with every bug and crash report. It only takes a line of code to integrate and is perfect for teams that are now working remotely. See more detailed features comparison and try Instabug for free here.