Dependency Injection Tutorial for iOS: Getting Started | Kodeco, the new raywenderlich.com

In this tutorial, you’ll learn about Dependency Injection for iOS, as you create the profile page of a social media app in SwiftUI.


This is a companion discussion topic for the original entry at https://www.kodeco.com/14223279-dependency-injection-tutorial-for-ios-getting-started

How do you pass multiple dependencies to a view model that are dynamic and don’t exist at compile time?

e.g:

container.register(type: FileDetailView.self, component: FileDetailView(title))

where init on FileDetailView is:

init(title: String) {
type or paste code here