Skip to content

A starting point for a Core Data app w/ non-blocking disk saves and background context for performing work, written in Swift 3.

License

Notifications You must be signed in to change notification settings

popwarsweet/CoreDataStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CoreDataStack

About

This is a template for a Core Data stack which can be used in apps needing basic support for background writes, main thread access, and a background context for work. It has been ported to Swift from an Objective-C repo.

Example

To init the stack:

let coreDataStack = CoreDataStack(
            dataModelFilename: "ExampleModel",
            storeFilename: "ExampleDatabase",
            inMemory: false,
            dumpInvalidStore: true,
            finished: { (success, error) in
                if success {
                    print("successfully opened core data store")
                } else {
                    print("failed to open core data store: \(error)")
                }
        })

Installation (ol' fashion ⌘C ⌘V)

Copy and paste CoreDataStack.swift into your project.

Author

Kyle Zaragoza, popwarsweet@gmail.com

License

CoreDataStack is available under the MIT license. See the LICENSE file for more info.

About

A starting point for a Core Data app w/ non-blocking disk saves and background context for performing work, written in Swift 3.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages