App Router

Navigation made easy...


SwiftSail is built on top of the one single app router where all the routing logic happens. Each feature is represented by its manager and all managers are launched in the app router.

The starting point of SwiftSail is SceneDelegate.swift:

AppRouter(
    dependencies: dependencies,
    mainNavigationController: navigationController
).start()

All app flows are triggered on one single main navigation controller.

App router has access to all app dependencies such as repositories or interactors and can implement logic to route users to a specific screen based on the current state.

App router is also a one and only source of dependencies and also handles an injection of dependencies required by each features.

It's important to spend some time studying this code as it will play a major role in your future app development and scalability.