How to use Core Data with MVVM Architecture in SwiftUI | Continued Learning #15
Swiftful Thinking Swiftful Thinking
42.6K subscribers
46,920 views
0

 Published On Apr 15, 2021

In the last video in this series, we learned how to implement Core Data into SwiftUI applications using @FetchRequest. Although that method is more "SwiftUI", it's not always practical to use in production applications. In this video we will learn an alternative approach and connect Core Data to our app using a ViewModel in MVVM (Model-View-ViewModel architecture). As you'll see, the main benefit to this method is that we can separate our code so that the code relating to updating Core Data is totally separate from the code relating to the View (the UI).

If you've watched both videos... which method do you prefer?
Leave a comment below :)

Next video:    • Core Data relationships, predicates, ...  
Last video:    • How to use Core Data with @FetchReque...  

show more

Share/Embed