ChatboxConfiguration

public struct ChatboxConfiguration

Encapsulate all the configuration options that can be applied to the chatbox.

Usage: instantiate a default configuration, set the properties you want, and apply them to the chatbox:

var configuration = ChatboxConfiguration()
configuration.accentColor = .red
IAdvizeSDK.shared.chatboxController.setupChatbox(configuration: configuration)
  • Main color of the chatbox and chat button.

    The main color will be used:

    • in the chat button, for:

      • the color of the default chat button
    • in the chatbox, for:

      • the color of the outgoing message bubble
      • the color of the send button in the message composition bar

    Declaration

    Swift

    @available(*, deprecated, message: "Use `outgoingMessageBackgroundColor` & `accentColor` instead.")
    public var mainColor: UIColor { get set }
  • Content of the first automatic message that invites your visitor to start asking a question.

    Should be localized.

    By default, this property is nil and no automatic message will be displayed in the chatbox.

    Declaration

    Swift

    public var automaticMessage: String?
  • Content of the first GDPR message which invites your visitor to accept or decline the GDPR consent.

    Should be localized.

    By default, we will use a default GDPR consent message (if the GDPR feature is activated).

    Declaration

    Swift

    public var gdprMessage: String?
  • Font that will be used to display text in all UI elements of the iAdvize SDK.

    The font with the same name will be used but its size will be adapted according to the element in which it is used.

    By default, the system font provided by iOS is used.

    Declaration

    Swift

    public var font: UIFont?
  • Background color of the Navigation Bar of the chatbox.

    By setting this property, you will update the background color of the Navigation Bar so the chatbox will fit your navigation experience.

    By default, we will use UIColor.systemBackground.

    Declaration

    Swift

    public var navigationBarBackgroundColor: UIColor
  • Color of the elements which are contained in the Navigation Bar.

    By setting this property, you will update the color of all the elements which are in the Navigation Bar of the chatbox: buttons and labels.

    By default, we will use UIColor.label.

    Declaration

    Swift

    public var navigationBarMainColor: UIColor
  • Localized title of the Conversation Navigation Bar.

    By setting this property, you will update the title in the Navigation Bar of the chatbox.

    By default, we will use the “Conversation” string.

    Declaration

    Swift

    public var navigationBarTitle: String?
  • Incoming message (chat operator message) avatar.

    By setting this property, you will update the avatar displayed for the incoming messages. You can set an URL or a local image.

    Declaration

    Swift

    public var incomingMessageAvatar: IncomingMessageAvatar?
  • Presentation style of the Chatbox.

    By setting this property, you will update the way the chatbox will be modally presented.

    Declaration

    Swift

    public var presentationStyle: UIModalPresentationStyle?
  • If specified, this view controller will be used to present the chatbox, when the default chat button is tapped.

    Declaration

    Swift

    public var presentingViewController: UIViewController?
  • Color of message bubble for incoming (operator) messages

    Declaration

    Swift

    public var incomingMessageBackgroundColor: UIColor?
  • Color of message text for incoming (operator) messages

    Declaration

    Swift

    public var incomingMessageTextColor: UIColor?
  • Color of message border for incoming (operator) messages

    Declaration

    Swift

    public var incomingMessageBorderColor: UIColor?
  • Color of message bubble for outgoing (visitor) messages

    Declaration

    Swift

    public var outgoingMessageBackgroundColor: UIColor?
  • Color of message text for outgoing (visitor) messages

    Declaration

    Swift

    public var outgoingMessageTextColor: UIColor?
  • Color of message border for outgoing (visitor) messages

    Declaration

    Swift

    public var outgoingMessageBorderColor: UIColor?
  • Color used for message controls (quick answers, file messages, send button etc…)

    Declaration

    Swift

    public var accentColor: UIColor?
  • Create a ChatboxConfiguration with the default values.

    Declaration

    Swift

    public init()