CypherPoetCoreDataKit
A collection of utilities for building Core Data applications in SwiftUI.
🚧 Disclaimer
This library is still very much a WIP as I study some of the new best practices, patterns, and affordances for Core Data after the release of SwiftUI 2.0. Please treat it as a guideline/reference for the time being
Features
✅ ACoreDataManagerthat handles setting up your "Core Data Stack".✅ AFetchedResultsControllingprotocol that helps architectNSFetchedResultsControllerinstances and extract data from theirNSFetchRequestresults.✅ Predicate Utilities✅ Strongly-typed errors for save operations.✅ NSPersistentStorehelpers for usingNSSQLiteStoreTypein production apps andNSInMemoryStoreTypein tests or previews:
Installation
Xcode Projects
Select File -> Swift Packages -> Add Package Dependency and enter https://github.com/CypherPoet/CypherPoetCoreDataKit.
Swift Package Manager Projects
You can add CypherPoetCoreDataKit as a dependency in your Package.swift file:
let package = Package(
//...
dependencies: [
.package(url: "https://github.com/CypherPoet/CypherPoetCoreDataKit", from: "0.0.14"),
],
//...
)Then simply import CypherPoetCoreDataKit wherever you’d like to use it.
Usage
Usage of these utilities is best demonstrated by the Example App.
Setting up the Core Data stack on launch by utilizing CoreDataManager's default shared instance.
- iOS Example
- macOS Example
🔑 This corresponds to settingCoreDataManager.managedObjectModelNameto match the name of your app'sxcdatamodeldfile.- For more control and customization, a
CoreDataManagerinstance can be initialized directly with amanagedObjectModelNameand astorageStrategy.
Contributing
Contributions to CypherPoetCoreDataKit are most welcome. Check out some of the issue templates for more info.
Developing
Requirements
- Xcode 12.0+ (for developing)
Generating Documentation
Documentation is generated by Jazzy. Installation instructions can be found here, and as soon as you have it set up, docs can be generated simply by running jazzy from the command line.
docs folder for you to view locally. This folder is being ignored by git, as an action exists to automatically generate docs and serve them on the project's gh-pages branch.
License
CypherPoetCoreDataKit is available under the MIT license. See the LICENSE file for more info.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

