GuidanceAnnouncement

public struct GuidanceAnnouncement : Equatable

Guidance announcement relating to a maneuver during navigation. The announcement text message is provided in both Speech Synthesis Markup Language (SSML) and plain-text formats.

Lifecycle

  • Initializes a guidance announcement with the specified parameters.

    Declaration

    Swift

    public init(
        id: UUID = UUID(),
        language: Locale,
        messageContent: String,
        announcementType: AnnouncementType
    ) throws

    Parameters

    id

    The ID of the announcement.

    language

    The language of the message as Locale.

    messageContent

    A verbal message for the maneuver in String format.

    announcementType

    Type of the announcement.

  • Initializes a guidance announcement from a route announcement.

    Important

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

    Declaration

    Swift

    public init(announcement: Announcement, language: Locale) throws

    Parameters

    announcement

    Announcement instance used as a source of data for creating a GuidanceAnnouncement instance.

    language

    The language of the message as Locale. Example of identifier: “en-US”.

Public

  • id

    The unique ID of the announcement.

    Declaration

    Swift

    public let id: UUID
  • The language of the message as Locale.

    Declaration

    Swift

    public let language: Locale
  • Type of the announcement.

    Declaration

    Swift

    public let announcementType: AnnouncementType
  • A verbal message for the maneuver in SSML format.

    Declaration

    Swift

    public internal(set) var ssmlMessage: String { get }
  • A verbal message for the maneuver in plain text.

    Declaration

    Swift

    public internal(set) var plainTextMessage: String { get }
  • An attributed string that contains a verbal message for the manuever.

    Declaration

    Swift

    public internal(set) var attributedStringMessage: NSAttributedString? { get }

GuidanceAnnouncement.InitializationError