ekazaev/route-composer

How to handle routing in a multi-window app?

bennnjamin opened this issue · 4 comments

Hello, I need to figure out the best way to handle multiple windows, and how to properly implement this in my app.

For example, I am implementing a floating window (like a video player) within the app. So the video can be played full screen, and you can minimize it to a small window. The video player view controller may have it's own routes to go to some other screens within the window. While the player is minimized, the user can navigate around the keyWindow of the app, using typical RouteComposer configuration.

It should also support deeplinking so that RouteComposer can automatically create and display the video player in a new window when the app is launched, with the ability to minimize back to the main app.

Is this possible with RouteComposer? I know that you can provide a UIWindow when searching for existing view controllers, but I'm not sure the right way to code this.

Hi @bennnjamin

Thank you for your question and sorry for the late reply.

Unfortunately I didnt have a chance to use RouteComposer in multi-widow environment. I am also not familiar with the multiwindow api. I assume its IPad only and I thought only user can initiate a new window creation. Or you are talking about just a new UIWindow object within the same one window app? Anyway - I suggest you to try to play with a window provider. It is a starting point of every search. You can substitute it once for the entire project in RouteComposerDefaults so you dont have to insert it individually. Check the option of using 2 different routers if it fits your business needs.

Otherwise I am happy to help you find an answer to some specific question. But I can give much advice overall.

Thanks, I think I will look into the window provider. Yes I am talking about a new UIWindow object within the same app. This allows you to have floating content that always appears on top of other views in your app, even while navigating or presenting modal content behind this view.

@bennnjamin I have the feeling then that playing with the window provider should be enough but let me know if you have any questions. Ill try to answer faster

@bennnjamin Ill close this issue. Please feel to reopen it or create a new one if needed.