Other Protocols

The following protocols are available globally.

  • Protocol which defines a type which can be used for fetching or refreshing routes.

    SDK provides conformance to this protocol for Directions and MapboxRoutingProvider.

    See more

    Declaration

    Swift

    public protocol RoutingProvider
  • RoutingProvider request type.

    See more

    Declaration

    Swift

    public protocol NavigationProviderRequest
  • Protocols that provide no-op default method implementations can use this protocol to log a message to the console whenever an unimplemented delegate method is called.

    In Swift, optional protocol methods exist only for Objective-C compatibility. However, various protocols in this library follow a classic Objective-C delegate pattern in which the protocol would have a number of optional methods. Instead of the disallowed optional keyword, these protocols conform to the UnimplementedLogging protocol to inform about unimplemented methods at runtime. These console messages are logged to the subsystem com.mapbox.com with a category of the format “delegation.ProtocolName”, where ProtocolName is the name of the protocol that defines the method.

    The default method implementations should be provided as part of the protocol or an extension thereof. If the default implementations reside in an extension, the extension should have the same visibility level as the protocol itself.

    See more

    Declaration

    Swift

    public protocol UnimplementedLogging
  • A cache consists of both in-memory and on-disk components, both of which can be reset.

    Declaration

    Swift

    @objc(MBBimodalCache)
    public protocol BimodalCache
  • A cache which supports storing images

    Declaration

    Swift

    public protocol BimodalImageCache : BimodalCache
  • A cache which supports storing data

    Declaration

    Swift

    public protocol BimodalDataCache : BimodalCache
  • The NavigationInteractionDelegate protocol is used to define interaction events that the top banner may need to know about.

    See more

    Declaration

    Swift

    public protocol NavigationMapInteractionObserver : AnyObject
  • This protocol defines a UI Component that is capable of presenting a status message.

    See more

    Declaration

    Swift

    public protocol NavigationStatusPresenter : AnyObject
  • The RouteVoiceControllerDelegate protocol defines methods that allow an object to respond to significant events related to route vocalization

    See more

    Declaration

    Swift

    public protocol RouteVoiceControllerDelegate : AnyObject, UnimplementedLogging