CocoaPods trunk is moving to be read-only. Read more on the blog, there are 8 months to go.

ChatAssist 0.1.2

ChatAssist 0.1.2

Maintained by Vijay Shanker Jagoori.



  • By
  • Readyly

Chat Assist SDK

Table of Contents

Chat Assist SDK helps you to seamlessly integrate a chat window into your application, providing real-time messaging capabilities and enhancing user interaction.

Instructions on how to install the project.

List any prerequisites that need to be installed first.

  • Xcode 15 or later
  • CocoaPods (If CocoaPods is the package manager)

You can use CocoaPods to install ChatAssist

  • To install Cocoapods to Mac, on the Terminal, run sudo gem install cocoapods
  • Adding ChatAssist to your Podfile:
use_frameworks!

target 'MyApp' do
    pod 'ChatAssist'
end
  • Run pod install on the terminal where Podfile is located.
  • Add ChatAssist to the file where you want to use by
import ChatAssist
  • Initialize the ChatAssist by providing the context parameters. orgName : Organisation name profile : Chat Profile *optional
let context = Chat.Context(orgName: "help", profile: "christmas")
var chat = try Chat(context: context)
  • Start chat session
    chat?.startSession()
  • End chat session
    chat?.endSession()
  • Observing States and Messages from the Chat Server, add ChatAssistDelegate
extension ChatViewModel: ChatAssistDelegate {
    public func chatDidReceiveErrorAction(message: String) {
        print("Error occured: \(message)")
    }

    public func chatDidReceiveReadyAction() {
    
    }
    
    public func chatDidReceiveCloseAction() {
    
    }
    
    public func chatDidReceiveExpandAction() {
        
    }
    
    public func chatDidReceiveMinimiseAction() {
        
    }
}
  • Sending user details

The payload type is dictionary. If user details are not sent, the widget will prompt the user when required.

chat?.postMessage(type: .userDetails, payload: ["firstName":"Mauro",
                                                "lastName":"Icardi",
                                                "email":"[email protected]"])
  • Sending additional details

The payload type is dictionary. details within the payload will be attached to the ticket created during the session. If the append option is false any prior additional details will be overwritten.

chat?.postMessage(type: .additionalDetails, payload: ["details":"diagnostics or relevant details",
                                                        "options": ["append":false]])