Hi I'm trying to use this library with the new SwiftUI lifecycle that doesn't have an AppDelegate, it seemed ok to initialize it in the "App" class (the one with @main annotation) but when i do, it throws an error "Fatal error: root DependencyContainer is not yet set."
@main
class ChopsticksApp: App {
@Inject var viewModel: StartupViewModel
required init() {
FirebaseApp.configure()
DependencyContainer.defined(by: modules { .main; .restaurant; .common; .restaurantList })
}
var body: some Scene {
WindowGroup {
}
}
}
Also this method of initialization is giving another error
The modules are defined like this
public extension DependencyContainer {
static var main = module {
single { FirebaseApp.app() as FirebaseApp? }
}
}
Hi I'm trying to use this library with the new SwiftUI lifecycle that doesn't have an AppDelegate, it seemed ok to initialize it in the "App" class (the one with @main annotation) but when i do, it throws an error "Fatal error:
root
DependencyContainer is not yet set."Also this method of initialization is giving another error
The modules are defined like this