A lightweight Swift library to store and retrieve Codable objects across UserDefaults, Files, and Keychain with minimal code.
PersistenceKit is a Swift library that enables developers to store and retrieve Codable objects across various local persistence layers—UserDefaults, Files, and Keychain—with minimal boilerplate code. It solves the problem of writing repetitive, error-prone persistence logic by providing a unified, type-safe API that integrates seamlessly with Swift's Codable protocol and keypaths.
iOS, macOS, tvOS, and watchOS developers who need a simple, consistent way to persist Codable objects locally without managing low-level storage details.
Developers choose PersistenceKit for its lightweight design, intuitive API, and full leverage of Swift's modern features like Codable and keypaths, reducing persistence code to just a few lines while maintaining type safety and flexibility across multiple storage backends.
Store and retrieve Codable objects to various persistence layers, in a couple lines of code!
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides consistent methods like save, retrieve, and delete across UserDefaults, Files, and Keychain stores, reducing boilerplate code and simplifying maintenance.
Leverages Swift's Codable protocol for type-safe encoding and decoding, ensuring compile-time safety and seamless serialization.
Uses Swift keypaths to define unique IDs, supporting any type (e.g., Int, String) and eliminating string-based errors in object identification.
Enables data sharing between apps and extensions via shared UserDefaults and file stores, as shown in usage examples with groupIdentifier parameters.
Only supports basic operations like fetching by ID or retrieving all objects; lacks advanced features such as filtering, sorting, or pagination.
The library does not provide built-in support for data migrations, requiring manual handling when Codable models change, which can lead to data loss or corruption.
Storing large numbers of objects in FilesStore may cause performance issues due to individual file management, despite being designed for large datasets.