A 100% Swift, boilerplate-free Core Data stack that simplifies persistent storage management for iOS/macOS apps.
DATAStack is a Swift library that simplifies Core Data setup and management by removing boilerplate code. It provides an easy-to-use stack for handling persistent storage, managed object contexts, and database operations in iOS and macOS applications. It solves the problem of repetitive and error-prone Core Data initialization and thread management.
iOS and macOS developers using Swift or Objective-C who need to integrate Core Data into their apps without writing extensive boilerplate code. It's especially useful for developers looking for a clean, thread-safe way to manage persistent storage.
Developers choose DATAStack because it eliminates Core Data boilerplate, offers built-in thread safety, optimizes for unit testing with synchronous execution, and supports both SQLite and in-memory stores out of the box—all while being free and compatible with Swift and Objective-C.
100% Swift Simple Boilerplate Free Core Data Stack. NSPersistentContainer
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Clear separation between main and background contexts reduces common Core Data threading errors, as demonstrated by the easy access to mainContext and performInNewBackgroundContext methods.
Runs synchronously in testing environments when using in-memory stores, eliminating the need for XCTestExpectations and simplifying test code, as highlighted in the Testing section.
Avoids singletons to encourage better patterns, making the stack instance-based and easier to integrate without global state, as stated in the philosophy.
Out-of-the-box support for SQLite and in-memory stores with customizable names and container URLs, shown in the multiple initialization options for different use cases.
On migration failures, DATAStack destroys the existing database and creates a new one, which can lead to data loss in production apps, as admitted in the Migrations section.
Focuses on basic setup and context management, lacking built-in APIs for complex Core Data operations like batch updates or NSFetchedResultsController integration without additional libraries.
The README only mentions compatibility up to Swift 4, raising concerns about ongoing support for newer Swift versions and iOS updates, with no recent activity indicators.