CometChat SDK provides you with a mechanism to get real-time status whenever a user logs into CometChat or logs out from CometChat. Login Listener provides you with the below 4 methods:Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-docs-android-v6-beta2.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
| Delegate Method | Information |
|---|---|
| onLoginSuccess(user: User) | This method is triggered when the user successfully logs into the CometChat SDK. It returns an Object of the User loggedIn. |
| onLoginFailed(error: CometChatException?) | This method is triggered when the user could not successfully log into the CometChat SDK. It returns an Object of the CometChatException. |
| onLogoutSuccess() | This method is called when the user successfully logs out from the CometChat SDK. It does not return anything. |
| onLogoutFailed(error: CometChatException?) | This method is triggered when the user could not successfully log out of the CometChat SDK. It returns an Object of the CometChatException. |
CometChatLoginDelegate as CometChat.logindelegate = self . Here is the example of CometChatLoginDelegate:
- Swift
- Objective C