5/27/2023 0 Comments Swift share gif exampleThis is the app flow in action □ Coordinators Finally, and probably most importantly, the approach should be easy to support deeplinks/Universal Links. Also, we should only be able to access routes that are relevant to that page. Seems like a lot, doesn't it? But we'll break these concepts down throughout this post.Īn ideal approach will allow us to inject a Route into a Controller or ViewModel so we can easily open and/or close certain screens. Independent of the app's architecture it's clear that there are many repetitive flows in this example, and it'd be best if we could somehow make them isolated, reusable, composable and testable (hi there, SOLID! □). I know that this "simple" example is hard to picture, so have a look a the flow drawn below: Finally, from the Forgot Password page, users can reset their password which will present them with a Pop Up confirmation. They can also access the Forgot Password page from Sign Up. From the Login page, a user can access the Sign Up and Forgot Password pages. From this Product page, the user can open another Product page, add an item to their Wishlist, which will present a Pop Up confirmation, or even create a Siri Shortcut for that product.įrom the Wishlist tab, a user can also open a Product, with the same flow as described above, and Login pages. In order to explore some real-life scenarios of a more complex routing mechanism, including managing a Siri Shortcut flow, let's think of a simple sample app that has a TabBarController with a Shop and Wishlist tabs.įrom the Shop tab, a user can open a Product page. Most of mid to big projects will have dozens of screens and rather complex routing flows between them. There are many concerns about it, such as reusability, testability and ability to handle deeplinks/ Universal Links. One of the hottest topics in the iOS community is view controller orchestration. This is the first part of a series of articles about a Clean, Simple and Composable Routing for iOS apps. Clean, Simple and Composable Routing for iOS Apps
0 Comments
Leave a Reply. |