In order to get started and initialize the Mobile App Messaging SDK, utilize the following functions:
- Initialize the SDK and all of its components, SDK can be initialized with or without a Brand Id.
public func initialize(brandID: String? = nil) throws
- The ContainerViewController paramater will show the Conversation Window. If no ContainerViewController is passed, the SDK will provide a ViewController. This is called Window Mode. If ContainerViewController is passed, the SDK will use it to Host the Conversation Window. This is called ViewController Mode.
public func showConversation(conversationQuery: ConversationParamProtocol, authenticationCode: String? = nil, containerViewController: UIViewController? = nil)
- The below will remove the Conversation Windown from the ViewController. If using Window mode, this will remove the ConversationViewController from the Screen. When in ViewController mode, the host ViewController needs to be dismissed.
public func removeConversation(conversationQuery: ConversationParamProtocol)
When using Custom View Controller Mode, the Conversation view must be removed when leaving the App. To avoid dismissing the View when CSAT/SecureForms/PhotoSharing View is presented, you should only dismiss the Conversation view if Moving From ParentView, example here.
- Will get ’filter’ for the conversation screen, determining which of the conversations will be displayed in the Conversation Window
public func getConversationBrandQuery(_ brandID: String, campaignInfo: LPCampaignInfo? = nil) -> ConversationParamProtocol
- Will get ’filter’ for the conversation screen, determining which of the conversations will be displayed in the Conversation Window, using the Consumer ID
public func getConversationConsumerQuery(consumerID: String?, brandID: String, agentToken: String) -> ConversationParamProtocol
- Will return a boolean flag, ready means that the Brand is connected and conversation can be proccessed.
public func isBrandReady(brandID: String) -> Bool