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.

Important

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

Lifecycle

  • Initializes a guidance announcement with the specified parameters.

    Declaration

    Swift

    public init(
        id: UUID = UUID(),
        language: String,
        message: String,
        messagePhonetics: Phonetics? = nil,
        announcementType: AnnouncementType
    ) throws

    Parameters

    id

    The ID of the announcement.

    language

    The language of the message as an IETF language tag, i.e., a dash-separated two-letter ISO-639 language code, and a two-letter ISO 3166 country code. Example: “en-US”

    message

    A verbal message for the maneuver.

    messagePhonetics

    Phonetic strings of all of the readable Instruction properties.

    announcementType

    Type of the announcement.

  • Initializes a guidance announcement from a route announcement.

    Declaration

    Swift

    public init(announcement: Announcement) throws

    Parameters

    announcement

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

Public

  • id

    The unique ID of the announcement.

    Declaration

    Swift

    public let id: UUID
  • The language of the message as an IETF language tag, i.e., a dash-separated two-letter ISO-639 language code, and a two-letter ISO 3166 country code. Example: “en-US”

    Declaration

    Swift

    public let language: String
  • A verbal message for the maneuver.

    Important

    Please note that message is deprecated. Please use ssmlMessage or attributedStringMessage instead

    Declaration

    Swift

    public internal(set) var message: String { get }
  • Phonetic strings of all of the readable Instruction properties.

    Important

    Please note that messagePhonetics is deprecated. Please use ssmlMessage or attributedStringMessage instead

    Declaration

    Swift

    public let messagePhonetics: Phonetics?
  • 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 }
  • NSAttributedString representation of the GuidanceAnnouncement.

    Declaration

    Swift

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