RIBs icon indicating copy to clipboard operation
RIBs copied to clipboard

SceneDelegate and AppDelegate split

Open alexvbush opened this issue 6 years ago • 0 comments

iOS 13 introduces new SceneDelegate that suppose to take care of all UI related instantiations and takes that responsibility away from AppDelegate. Now app delegate suppose to setup dependencies and data for the app. Are there any plans to split things up the same way in RIBs architecture?

As it currently stands RootBuilder.build() creates an instance of LaunchRouting and then we give that instance a window to work with and draw content/VCs on. It seems like if this setup is preserved that means RootBuilder.build() should be called and LaunchRouting should be created for each scene instance. That makes sense because we would want to have a brand new RIBs tree for each window. But would it make sense to move shared dependency between those trees to AppDelegate? AppComponent that implements Component<EmptyDependency>, RootDependency could potentially be created in AppDelegate and passed to ever new root for every new scene/window created. Although I'm not sure how actual mechanics of this are going to work because as far as I can tell there is no way to pass things cleanly from app delegate instance to scene delegate instances.

alexvbush avatar Jul 08 '19 04:07 alexvbush