A minimalistic, thread-safe, non-boilerplate Swift library for Core Data, inspired by Active Record.
Skopelos is a Swift library that provides a minimalistic, thread-safe wrapper around Core Data, inspired by the Active Record pattern. It simplifies data persistence in iOS/macOS apps by reducing boilerplate code and ensuring safe concurrent access to managed object contexts. The library implements a CQRS approach with clear separation of read and write operations.
iOS and macOS developers working with Core Data who want a safer, simpler alternative to raw Core Data or libraries like MagicalRecord, especially those building apps with complex data models and concurrency requirements.
Developers choose Skopelos for its thread-safe design, reduced boilerplate, and explicit context management, which prevent common Core Data pitfalls. It offers a clean API with CQRS separation, automatic state handling, and no singleton dependency, making it testable and easy to integrate via dependency injection.
A minimalistic, thread safe, non-boilerplate and super easy to use version of Active Record on Core Data. Simply all you need for doing Core Data. Swift flavour.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All data access is inherently thread-safe, preventing common Core Data concurrency bugs by enforcing context-per-thread patterns, as emphasized with the -com.apple.CoreData.ConcurrencyDebug flag recommendation.
Implements Command and Query Responsibility Segregation with separate read() and writeSync()/writeAsync() methods, making data operations explicit and reducing errors, as shown in the clean API design.
Includes an AppStateReactor that silently saves in-flight changes when the app backgrounds or terminates, ensuring data persistence without manual intervention, as described in the README.
Provides CRUD helper methods like SK_create and SK_all that simplify entity operations within safe read/write blocks, drastically reducing repetitive Core Data code, as demonstrated in the usage examples.
Skopelos is exclusively designed for Core Data, offering no flexibility for teams using or considering alternative databases like Realm or direct SQLite, which limits its applicability.
The library relies on traditional completion blocks for async operations, lacking native integration with Swift's async/await, making code less elegant in modern Swift projects compared to newer libraries.
It imposes a specific managed object context stack with the main context as the single source of truth, which might not align with all architectural preferences or complex migration scenarios, reducing flexibility.
Skopelos is an open-source alternative to the following products: