I've been facing problems with the SwiftUI preview, I have an app that runs clean architecture in multiple modules, SwiftUI preview doesn't work properly running the app scheme, so I had to run specifically the UI module, this works properly in most of the cases but sometimes injecting with @LazyInjected doesn't solve the issue and get the error resetAndTriggerFatalError("\(T.self) was not registered", #file, #line), I tried changing the build configuration to release for that module but for some reason the preview didn't work at all.
public func promised<T>(key: StaticString = #function) -> Factory<T?> {
Factory<T?>(self, key: key) {
#if DEBUG
if self.manager.promiseTriggersError {
resetAndTriggerFatalError("\(T.self) was not registered", #file, #line)
} else {
return nil
}
#else
nil
#endif
}
}
Hello,
I've been facing problems with the SwiftUI preview, I have an app that runs clean architecture in multiple modules, SwiftUI preview doesn't work properly running the app scheme, so I had to run specifically the UI module, this works properly in most of the cases but sometimes injecting with
@LazyInjected
doesn't solve the issue and get the errorresetAndTriggerFatalError("\(T.self) was not registered", #file, #line)
, I tried changing the build configuration to release for that module but for some reason the preview didn't work at all.