IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMSDKListenerabstract
Swift - V2TIMSDKListener
Swift

Protocol V2TIMSDKListener

public protocol V2TIMSDKListener : AnyObject  

Definition of V2TIMSDKListener

V2TIMSDKListener V2TIMSDKListener AnyObject AnyObject V2TIMSDKListener->AnyObject

Conforms To

AnyObject

Requirements

on​Connecting()

func onConnecting() 

The SDK is connecting to the CVM instance

on​Connect​Failed(code:​err:​)

func onConnectFailed(code: Int32, err: String) 

on​Kicked​Offline()

func onKickedOffline() 

The current user is kicked offline. When this occurs, you can notify the user on the UI and then call the login() function of V2TIMManager to log in the user again.

on​User​Sig​Expired()

func onUserSigExpired() 

The ticket expired while the user is online. When this occurs, you need to generate a new userSig and call the login() function of V2TIMManager to log in the user again.

on​Self​Info​Updated(info:​)

func onSelfInfoUpdated(info: V2TIMUserFullInfo) 

The profile of the current user was updated

on​User​Status​Changed(user​Status​List:​)

func onUserStatusChanged(userStatusList: Array<V2TIMUserStatus>) 

The status of a user changed.

    1. The status (including online status and custom status) of a subscribed user changed.
    1. The status (including online status and custom status) of a friend changed (if the user has enabled friend status change notifications in the console).
    1. When an account is logged into multiple devices, and the custom status of one of the devices changes, all devices will receive this callback.

on​Connect​Success()

func onConnectSuccess() 

The SDK is successfully connected to the CVM instance

on​User​Info​Changed(user​Info​List:​)

func onUserInfoChanged(userInfoList: Array<V2TIMUserFullInfo>) 

The SDK failed to connect to the CVM instance

User profile change notification

  • This callback is triggered when the user profile of a subscribed (subscribeUserInfo) non-friend user has changed.

on​All​Receive​Message​Opt​Changed(receive​Message​Opt​Info:​)

func onAllReceiveMessageOptChanged(receiveMessageOptInfo: V2TIMReceiveMessageOptInfo) 

The message receiving options for all conversations changed.

on​Experimental​Notify(key:​param:​)

func onExperimentalNotify(key: String, param: AnyObject) 

Experimental event notification