Protocols

The following protocols are available globally.

  • Engine that instantiates the update of the data store used for navigation.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol DataStoreMaintenanceEngine : ManageableEngine

MainNavigationEngines

  • Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol MainNavigationEngines
  • Provides access to Dynamic Routing

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol DynamicRoutingProvider
  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol RouteNavigationEnginesProvider

TomTomNavigation

  • The TomTomNavigation protocol defines the functionality of the navigation.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol TomTomNavigation : AnyObject

NavigationEngineRegistry

  • Provides access to current registered engines and allows updating them.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol NavigationEngineRegistry : AnyObject

NavigationEngines

NavigationStartObserver

  • An observer that receives navigation start events.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol NavigationStartObserver : Observer

NavigationMapMatchingObserver

  • An observer that receives navigation map matching events.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol NavigationMapMatchingObserver : Observer

NavigationProgressObserver

  • An observer that receives navigation progress events.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol NavigationProgressObserver : Observer

NavigationRouteObserver

  • An observer that receives navigation route events.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol NavigationRouteObserver : Observer

NavigationGuidanceObserver

NavigationLocationContextObserver

  • An observer that receives navigation guidance events.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol NavigationLocationContextObserver : Observer

NavigationDestinationArrivalObserver

  • An observer that receives navigation events of arrival at destination.

    Destination arrival is detected by the TomTomSDKNavigationEngines/ArrivalDetectionEngine. On arrival detection, navigation continues in turn-by-turn mode until it’s stopped or switched into free-driving mode.

    To be notified about the destination arrival event while navigating, first implement the NavigationDestinationArrivalObserver protocol:

    class NavigationDestinationArrivalObserverImpl: NavigationDestinationArrivalObserver {
        func didArriveAtDestination(route: TomTomSDKRoute.Route) {
            // Add code here that handles arrival at a destination.
        }
    }
    

    Then register this observer using addDestinationArrivalObserver(_:).

    To stop receiving the destination arrival event, unregister the observer using removeDestinationArrivalObserver(_:).

    See more

    Declaration

    Swift

    public protocol NavigationDestinationArrivalObserver : Observer

NavigationWaypointArrivalObserver

  • An observer that receives navigation events related with visiting waypoints.

    The waypoint arrival state changes are detected by the TomTomSDKNavigationEngines/ArrivalDetectionEngine. Different observer methods are called depending on what state has been detected by the TomTomSDKNavigationEngines/ArrivalDetectionEngine:

    To be notified about the waypoint arrival events while navigating, first implement the NavigationWaypointArrivalObserver protocol:

    class NavigationWaypointArrivalObserverImpl: NavigationWaypointArrivalObserver {
        func didArriveAtWaypoint(waypoint: RouteStop, on route: Route) {
            // Add code here that handles an arrival at a waypoint.
        }
    
        func didDepartFromWaypoint(waypoint: RouteStop, on route: Route) {
            // Add code here that handles a departure from a waypoint.
        }
    }
    

    Then register this observer using addWaypointArrivalObserver(_:).

    To stop receiving these events, unregister the observer using removeWaypointArrivalObserver(_:).

    See more

    Declaration

    Swift

    public protocol NavigationWaypointArrivalObserver : Observer

NavigationHorizonObserver

  • An observer that receives navigation horizon events.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol NavigationHorizonObserver : Observer

NavigationRouteTrackingStateUpdateObserver

  • An observer that receives route tracking state updates.

    The information about the route state is represented by RouteTrackingState. When the driver deviates or returns to the active route, the navigation engine sends route-tracking state updates to the observer.

    To start receiving route tracking state updates, become an observer using Navigation.addRouteTrackingStateUpdateObserver(_ observer:): To stop receiving route tracking state updates, remove the previously added observer using Navigation.removeRouteTrackingStateUpdateObserver(_ observer:):

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol NavigationRouteTrackingStateUpdateObserver : Observer

NavigationErrorObserver

  • An observer that receives navigation error events.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol NavigationErrorObserver : Observer
  • Specifies how to handle requests which failed during replanning of a Route.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol ReplanningRetryPolicy

SimpleEngineCommonCalculator

  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public protocol SimpleEngineCommonCalculator