Conclusion

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In this lesson, you learned to:

  • 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
Download course materials from Github
Previous: Demo Next: Dependency Injection for ViewModels Quiz