-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Egor Badmaev edited this page Jan 10, 2023
·
2 revisions
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 & CDStepProtocol
For 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
NSInMemoryStoreType
description forNSPersistentContainer