Swift-MVVMC-Demo
Swift-MVVMC-Demo copied to clipboard
Issues with SceneDelegate
Good afternoon, I am following this demo to use Coordinators which works very well with AppDelegate, but when using SceneDelegate I have problems
let coordinator: Coordinator coordinator = AppDelegate.container.resolve (SplashCoordinator.self)!
error.- Fatal error: Unexpectedly found nil while unwrapping an Optional value: file App / AppCoordinator.swift, line 29
They can help me how I could control this problem since I have several days without being able to solve it
Thank you
Hi,
I don't know how your code looks like. But as the error says, you have a nil value in AppCoordinator.swift, line 29.
Make sure you call AppDelegate.container.registerDependencies() before using AppDelegate.container.
In the AppDelegate I have it like this
in the SceneDelegate I have it like this
But when I enter SceneDelegate it gives me that problem mentioned above, I tried to control like this in the image below, but the device shows me a black screen
This is in the AppCoordinator
What do you recommend me to do Thanks for your attention