Classes

The following classes are available globally.

  • This class is the standard implementation of MessagingPublisher for connecting to a bot of the CAI platform via the Channel Connector.

    See more

    Declaration

    Swift

    public final class CAIConversation : MessagingPublisher
  • Handles Long Polling mechanism to CAI Channel Connector to load messages

    See more

    Declaration

    Swift

    public class PollMessageDelivery : MessageDelivering
  • This class allows you to communicate with all CAI channel-related HTTP APIs It implements ObservableObject to allow you to bind this object from your SwiftUI views

    See more

    Declaration

    Swift

    public final class CAIChannelService : ObservableObject
  • Implements ObservableObject, Identifiable protocols. Manages available theme and current active one.

    Singleton class, call ThemeManager.shared to retrieve it. You can set the active theme by calling ThemeManager.shared.setCurrentTheme(CAITheme)

    See more

    Declaration

    Swift

    public final class ThemeManager : ObservableObject, Identifiable
  • Undocumented

    See more

    Declaration

    Swift

    public final class MockPublisher : MessagingPublisher
  • MessagingViewModel is the key object that sits between the UI and the Model It is a mandatory EnvironmentObject consumed by AssistantView

    It implements BindableObject protocol which allows you to directly bind public properties from your SwiftUI view

    See more

    Declaration

    Swift

    public final class MessagingViewModel : ObservableObject, Identifiable
  • The data model for the typing indicator SwiftUI view TypingIndicatorView. Implements ObservableObject protocol.

    See more

    Declaration

    Swift

    public final class TypingIndicatorData : ObservableObject, Identifiable
  • This class is meant to be used by UIKit like a standard UIViewController. It will host the SwiftUI AssistantView with default parameters.

    Do not use this class if you are using SwiftUI in your project, it is recommended to directly work with AssistantView. Do not use with Storyboards.

    let publisher = <#some MessagingPublisher#>
    let vc = MessagingViewController(MessagingViewModel(publisher: publisher))
    self.navigationController?.pushViewController(vc, animated: true)
    
    See more

    Declaration

    Swift

    open class MessagingViewController : UIHostingController<MessagingView>