Layer responsible for persistant data storage of the application
Just call for example UserDefaults.favouriteRecipes. All user defaults keys are described in UserDefaults.swift.
In this case, we have CoreDataManagerProtocol - typealias of another two protocols for working with Step and Recipe managed object models.
public typealias CoreDataManagerProtocol = CDRecipeProtocol & CDStepProtocolFor working with User Defaults, we have implemented 2 property wrappers:
For working with Core Data we have implemented Core Data manager - the only place where import CoreData is placed.
It has 2 initializers:
- Usual init
- For unit-tests with
NSInMemoryStoreTypedescription forNSPersistentContainer
For more details, read GitHub Wiki documentation