Skip to main content
CometChat provides 4 listeners (Delegates) viz.
  1. User Delegate (Listener)
  2. Group Delegate (Listener)
  3. Message Delegate (Listener)
  4. Call Delegate (Listener)

User Delegate Methods

The CometChat provides you with live events related to users. Below are the callback methods provided by the CometChatUserDelegate. In order to use the Delegate methods you must add protocol conformance CometChatUserDelegate as Shown Below:
Do not forget to set your view controller as a CometChat delegate probably in viewDidLoad() as CometChat.userdelegate = self

Group Delegate Methods

The CometChatGroupDelegate provides you with all the real-time events related to groups. Below are the callback methods provided by the CometChatGroupDelegate. You can receive live events related to groups, In order to receive user Events, you must add protocol conformance CometChatGroupDelegate as shown below:
Do not forget to set your view controller as a CometChat delegate probably in viewDidLoad() as CometChat.groupdelegate = self

Message Delegate Methods

The CometChatMessageDelegate provides you with live events related to messages. Below are the callback methods provided by the CometChatMessageDelegate. In order to receive incoming messages, you must add protocol conformance CometChatMessageDelegate as Shown Below :
Do not forget to set your view controller as a CometChat delegate probably in viewDidLoad() as CometChat.messagedelegate = self

Call Delegate Methods

The CometChatCallDelegate provides you with live events related to calls. Below are the callback methods provided by the CometChatCallDelegate. In order to receive all call events, you must add protocol conformance CometChatCallDelegate as Shown Below :
Do not forget to set your view controller as a CometChat delegate probably in viewDidLoad() as CometChat.calldelegate = self