AnnouncementMessagesApplier

public struct AnnouncementMessagesApplier : AnnouncementMessagesApplierProtocol

AnnouncementMessagesApplier transforms the announcements contained in routes. Adds voice messages and combines close announcements.

Important

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

Public

  • Create a default AnnouncementMessagesApplier instance by the given language.

    Declaration

    Swift

    public static func createDefaultAnnouncementMessagesApplier(languageCode: String? = nil) -> AnnouncementMessagesApplier

    Parameters

    languageCode

    The language code in ISO 639-1 format, concatenting region code. For example: “pt_BR”

    Return Value

    AnnouncementMessagesApplier instance.

  • Entry point, it makes all the transformations for Routes.

    Declaration

    Swift

    public func applyVerbalMessagesForAnnouncements(in routes: [TomTomSDKRoute.Route]) -> [TomTomSDKRoute.Route]

    Parameters

    routes

    An array of Route instances to which the announcements need to apply.

    Return Value

    Update Route instances with the announcements applied.

  • Creates new announcement from the given instruction.

    Declaration

    Swift

    public func applyVerbalMessage(_ announcement: Announcement?, _ instruction: Instruction) -> Announcement?