// the find
ekazaev/route-composer
Protocol oriented, Cocoa UI abstractions based library that helps to handle view controllers composition, navigation and deep linking tasks in the iOS application. Can be used as the universal replacement for the Coordinator pattern.
RouteComposer moves view controller composition, navigation and deep-link handling out of UIViewController code and into declarative step configurations, which is its pitch as a drop-in replacement for Coordinators. It suits iOS teams with many navigation paths, deep-link requirements or A/B-tested flows, and it assumes the reader already understands UIKit container behavior well enough to write custom actions or adapters.
- The Factory, Finder, Action, RoutingInterceptor, ContextTask and PostRoutingTask protocols are small and separate, so 'is this screen already on the stack' is decoupled from 'how do I build it', and each piece can be tested on its own.
- StepAssembler's chain reads top to bottom as the routing decision (find or build, intercept, set context, push or present, track), which is easier to review in a PR than a Coordinator's nested switch statements.
- Container handling is a real extension point. Navigation, tab bar and split view adapters ship with the library, and ContainerAdapter lets you teach it a third-party container. The Example/Tests target covers routers, finders, containers, actions and assembly, so the routing rules have tests behind them.
- The README drifts from the code it documents. The Factory protocol it lists has only build, but the prose describes a prepare function. The table view sample indexes an optional array without unwrapping it and then guard-lets a non-optional UUID, so it would not compile as written. The SPM snippet pins 2.10.4 while the text credits 2.21.0 with the new step syntax.
- The generics stop at the seams that matter. Steps are typed as StepAssembler<ProductViewController, Any?>, and the README needs explicit annotations like LoginInterceptor<UUID> to work around Swift inference bugs it links to as still open. As far as the README's API shows, the context passed to the router is not checked against the step's context type at compile time.
- Most of the real guidance lives in the Example app and an external documentation site, not the README. A new adopter has to read Example/RouteComposer/Configuration and the View Controllers folder to learn the contract. The committed Example/Pods directory also means dependency state sits in git alongside the sample code.