Swift-MVVMC-Demo icon indicating copy to clipboard operation
Swift-MVVMC-Demo copied to clipboard

Issues with SceneDelegate

Open fabian1122 opened this issue 5 years ago • 2 comments

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

fabian1122 avatar Oct 23 '20 17:10 fabian1122

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.

wojciech-kulik avatar Oct 23 '20 20:10 wojciech-kulik

In the AppDelegate I have it like this Captura de Pantalla 2020-10-23 a la(s) 15 58 42 in the SceneDelegate I have it like this Captura de Pantalla 2020-10-23 a la(s) 16 02 27 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 Captura de Pantalla 2020-10-23 a la(s) 16 04 08 This is in the AppCoordinator

What do you recommend me to do Thanks for your attention

fabian1122 avatar Oct 23 '20 21:10 fabian1122