Explain the benefits of dependency injection for ViewModels.
Implement dependency injection practices within a SwiftUI application using MVVM.
This lesson’s sample app is small, to show you how dependency injection works. More complex apps have many more components and services, and this makes it harder to keep track of all dependencies. Fortunately, there are frameworks written by other developers to help you manage your app’s dependencies.
Whether these libraries are useful to you in your project, or you stick to the techniques learned in this lesson is a decision for you as an engineer to make. The needs of every project are different, so weigh up what you think is best.
See forum comments
This content was released on Feb 28 2025. The official support period is 6-months
from this date.
Summary of the key points.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous: Demo
Next: Dependency Injection for ViewModels Quiz
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.