DestinationProviding
@MainActor
public protocol DestinationProviding
This is an abstract protocol which defines Provider classes which build and provide new Destination objects, including their interface elements. Each Provider should be responsible for building a unique Destination and its associated interface.
Note
Adopt SDK-specific protocols like ViewDestinationProviding
or ControllerDestinationProviding
when creating your own provider classes.
-
An enum which defines all routable Destinations in the app.
Declaration
Swift
associatedtype DestinationType where Self.DestinationType == Self.PresentationConfiguration.DestinationType
-
The Destination class to be provided.
Declaration
Swift
associatedtype Destination : Destinationable
-
An enum which defines types of tabs in a tab bar.
Declaration
Swift
associatedtype TabType where Self.TabType == Self.PresentationConfiguration.TabType
-
An enum which defines available Destination presentation types. Typically this is
DestinationPresentationType
.Declaration
Swift
associatedtype PresentationType : DestinationPresentationTypeable
-
An enum which defines the types of content that are able to be sent through Destinations.
Declaration
Swift
associatedtype ContentType where Self.ContentType == Self.PresentationConfiguration.ContentType
-
A model type which configures Destination presentations. Typically this is a
DestinationPresentation
.Declaration
Swift
associatedtype PresentationConfiguration : DestinationPresentationConfiguring
-
A dictionary of presentation configuration models, with their keys being the user interaction type.
Declaration
Swift
@MainActor var presentationsData: [Destination.UserInteractionType : PresentationConfiguration] { get set }
-
A dictionary of interactor action configuration models, with their keys being the user interaction type associated with each interactor action.
Declaration
Swift
@MainActor var interactorsData: [Destination.UserInteractionType : any InteractorConfiguring<Destination.InteractorType>] { get set }
-
buildPresentations()
Default implementationGenerates Destination presentations associated with this provider.
Default Implementation
Declaration
Swift
@MainActor func buildPresentations() -> AppDestinationConfigurations<Destination.UserInteractionType, PresentationConfiguration>?
-
buildSystemPresentations()
Default implementationGenerates system navigation presentations supported by Destinations.
Default Implementation
Declaration
Swift
@MainActor func buildSystemPresentations() -> AppDestinationConfigurations<SystemNavigationType, DestinationPresentation<DestinationType, ContentType, TabType>>?
-
assignInteractorAssistants(for:
Default implementation) Assigns interactor assistants to the supplied Destination.
Default Implementation
Declaration
Swift
@MainActor func assignInteractorAssistants(for destination: Destination)
Parameters
destination
The Destination to have interactor assistants applied to.