Core Entities
-
Base router protocol.
See moreDeclaration
Swift
@MainActor public protocol Router -
Routing
See moreErrorrepresentationDeclaration
Swift
public enum RoutingError : Error, CustomStringConvertible -
The
Factoryprotocol should be implemented by the instance that produces any types of the view controllers.NB
See moreContextrepresents a payload that you need to pass to yourUIViewControllerand something that distinguishes it from others. It is not a View Model or some kind of Presenter. It is the missing piece of information. If your view controller requires aproductIDto display its content, and theproductIDis aUUID, then the type ofContextis theUUID. The internal logic belongs to the view controller.Contextanswers the questions What to I need to present a ProductViewController and Am I already presenting a ProductViewController for this product.Declaration
Swift
@MainActor public protocol Factory : AbstractFactory -
The
ContainerFactoryprotocol should be implemented by the instance that produces any types of the view controllers that can be considered as containers (eg:UINavigationController,UITabBarController, etc)The
See moreRouterusesContainerAction.perform(...)method of aContainerActionand then populates a full stack of the view controllers that were built by the associated factories in one go. Example:Routerrequires to populate N-view controllers intoUINavigationController‘s stack.Declaration
Swift
@MainActor public protocol ContainerFactory : AbstractFactory where Self.ViewController : ContainerViewController -
Represents an action that has to be applied to the
UIViewControllerafter it has been built (eg: push to navigation stack, present modally, push to tab, etc)Declaration
Swift
@MainActor public protocol Action : AbstractAction -
Represents an action to be used by a
See moreContainerFactoryto build it’s children view controller stackDeclaration
Swift
@MainActor public protocol ContainerAction : AbstractAction where Self.ViewController : ContainerViewController -
The result of the navigation process
- success: The request to process the navigation resulted in a successful navigation to the destination.
- failure: The request to process the navigation was not successful.
Declaration
Swift
public enum RoutingResult : Sendable -
Default configuration for all the instances in
RouteComposer.NB: If you are going to provide your own defaults, make sure that
See moreRouteComposerDefaults.configureWith(...)is called before the instantiation of any otherRouteComposer‘s instances.AppDelegateis probably the best place for it.Declaration
Swift
@MainActor public final class RouteComposerDefaults
Core Entities Reference