LegacyInAppMessage

public struct LegacyInAppMessage : Sendable, Equatable

Model object representing in-app message data.

  • Enumeration of in-app message screen positions.

    Declaration

    Swift

    public enum Position : String, Sendable
  • Enumeration of in-app message display types.

    Declaration

    Swift

    public enum DisplayType : String, Sendable
  • The unique identifier for the message

    Declaration

    Swift

    public let identifier: String
  • The expiration date for the message. Unless otherwise specified, defaults to 30 days from construction.

    Declaration

    Swift

    public let expiry: Date
  • Optional key value extra.

    Declaration

    Swift

    public let extra: AirshipJSON?
  • The display type. Defaults to LegacyInAppMessage.DisplayType.banner when built with the default class constructor. When built from a payload with a missing or unidentified display type, the message will be nil.

    Declaration

    Swift

    public let displayType: DisplayType
  • The alert message.

    Declaration

    Swift

    public let alert: String
  • The screen position. Defaults to LegacyInAppMessage.Position.bottom.

    Declaration

    Swift

    public let position: Position
  • The amount of time to wait before automatically dismissing the message.

    Declaration

    Swift

    public let duration: TimeInterval
  • The primary color. hex

    Declaration

    Swift

    public let primaryColor: String?
  • The secondary color hex.

    Declaration

    Swift

    public let secondaryColor: String?
  • The button group (category) associated with the message. This value will determine which buttons are present and their localized titles.

    Declaration

    Swift

    public let buttonGroup: String?
  • A dictionary mapping button group keys to dictionaries mapping action names to action arguments. The relevant action(s) will be run when the user taps the associated button.

    Declaration

    Swift

    public let buttonActions: [String : AirshipJSON]?
  • A dictionary mapping an action name to an action argument. The relevant action will be run when the user taps or “clicks” on the message.

    Declaration

    Swift

    public let onClick: AirshipJSON?
  • A UNNotificationCategory instance, corresponding to the button group of the message. If no matching category is found, this property will be nil.

    Declaration

    Swift

    @MainActor
    public var buttonCategory: UNNotificationCategory? { get }