@nicolaeturcan
There is an error at line: .environment(\.managedObjectContext, persistentContainer.viewContext) Error: "Cannot use mutating getter on immutable value: 'self' is immutable" Did you use lazy var persistentContainer? If so, then making it non-lazy should work.