Repolode
JohnEstropia

JohnEstropia/CoreStore

A Swift library that wraps Apple's Core Data with a type-safe, concurrency-safe API for iOS, macOS, watchOS and tvOS apps.

Stars
4,048
Forks
257
Open issues
98
Last commit
last month

What is it?

CoreStore is a Swift wrapper around Apple's Core Data framework. It replaces much of the boilerplate around NSManagedObjectContext, NSFetchedResultsController and KVO with a higher-level API for fetching, querying, saving and observing data.

All writes go through serial transactions (asynchronous, synchronous or unsafe), while the main context stays read-only. Models can be defined in pure Swift with CoreStoreObject and typed @Field properties instead of .xcdatamodeld files, and progressive migrations are driven by a version chain. Combine publishers and SwiftUI property wrappers are also provided.

The library targets iOS 16+, macOS 13+, watchOS 9+ and tvOS 16+ with Swift 5.9, and can be installed through CocoaPods, Carthage or Swift Package Manager.

Key features

  • 01Serial transactions for all writes, with a read-only main context.
  • 02Type-safe models declared in Swift via CoreStoreObject, without .xcdatamodeld files.
  • 03Progressive migrations driven by a migration chain of model versions.
  • 04Fluent fetch and query API with where, orderBy and aggregate clauses.
  • 05Observers for lists and objects, with diffable list support.
  • 06Combine publishers and SwiftUI property wrappers.

Use cases

  • Building an iOS app with Core Data that needs safer concurrency around writes.
  • Defining Core Data models in pure Swift code rather than Xcode model files.
  • Driving UITableView or UICollectionView updates from persistent data with diffable snapshots.
  • Managing schema migrations across many released app versions.

Things to know

  • Requires Swift 5.9 and recent OS versions: iOS 16.0+, macOS 13.0+, watchOS 9.0+, tvOS 16.0+.

In collections

Topics

FAQ

What is CoreStore?
A Swift library that wraps Apple's Core Data with a type-safe, concurrency-safe API for iOS, macOS, watchOS and tvOS apps. CoreStore is a Swift wrapper around Apple's Core Data framework. It replaces much of the boilerplate around NSManagedObjectContext, NSFetchedResultsController and KVO with a higher-level API for fetching, querying, saving and observing data.
Is CoreStore free to use? What license does it have?
CoreStore is open source under the MIT license. Check the license terms before using it in commercial products.
Is CoreStore still maintained?
Updated within 6 months. The last commit to CoreStore was on Oct 2, 2026.
What can I use CoreStore for?
Building an iOS app with Core Data that needs safer concurrency around writes. Defining Core Data models in pure Swift code rather than Xcode model files. Driving UITableView or UICollectionView updates from persistent data with diffable snapshots. Managing schema migrations across many released app versions.
Where can I get CoreStore?
The source code and installation instructions are on GitHub: https://github.com/JohnEstropia/CoreStore

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects