filmov
tv
How to best use Core Data with SwiftUI - MVVM - Unit test and working with the preview

Показать описание
In this tutorial, I am discussing ways on how to use Core Data with SwiftUI 2.0. I will use the template generated by Xcode for Core Data. In order to get a correct updating of the UI it is very important to consider Core Data entities as classes. In SwiftUI we can use the @FetchRequest property wrapper.
I will try to use MVVM design pattern in a different way. The goal is to write clean code and include unit test.
00:00 intro
02:16 What is MVVM?
05:05 Xcode template with Core data
20:27 using extensions for convenience initialisers
26:27 Core data entities can act like view models
34:02 optional attributes and syntactic sugar
39:11 core data working with the preview
47:14 unit tests
54:30 save content with ScenePhase going into background
01:00:06 wrap up
Watch more
If you liked what you learned and you want to see more, check out one of my courses!
👩🏻💻 Combine course
#SwiftUI #CoreData
I will try to use MVVM design pattern in a different way. The goal is to write clean code and include unit test.
00:00 intro
02:16 What is MVVM?
05:05 Xcode template with Core data
20:27 using extensions for convenience initialisers
26:27 Core data entities can act like view models
34:02 optional attributes and syntactic sugar
39:11 core data working with the preview
47:14 unit tests
54:30 save content with ScenePhase going into background
01:00:06 wrap up
Watch more
If you liked what you learned and you want to see more, check out one of my courses!
👩🏻💻 Combine course
#SwiftUI #CoreData
Комментарии