Swiftpack.co -  Package - georgesjamous/CoreDataStack
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
georgesjamous/CoreDataStack
A Core Data Stack helper library
.package(url: "https://github.com/georgesjamous/CoreDataStack.git", from: "1.0.2")

CoreDataStack

Maintenance GitHub issues

This is a quick implementation of a reusable core data stack helper library.

Instead of writing the same redundant code, this contains some useful basic operations.

CoreDataStack is wrapped with a protocol so you can replace the implementation later on at will.


Installation

Swift Package Manager:

URL: https://github.com/georgesjamous/CoreDataStack.git

Usage Example

let model = NSManagedObjectModel(...)
let stack = try CoreDataStack(launchType: .inMemory, managedObjectModel: model)
let stack = try CoreDataStack(launchType: .onDisk(identifier: "com.products"), managedObjectModel: model)
let context = stack.mainContext // access the main context
let context = stack.backgroundContext // access the background context
context.commit() // commits changes up the chain of contexts


Feel free to open a PR

GitHub

link
Stars: 0
Last commit: 1 week ago

Release Notes

1 week ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco