Protocol
V2TIMSDKListener
public protocol V2TIMSDKListener : AnyObject
Definition of V2TIMSDKListener
Relationships
Conforms To
AnyObject
Requirements
onConnecting()
func onConnecting()
The SDK is connecting to the CVM instance
onConnectFailed(code:err:)
func onConnectFailed(code: Int32, err: String)
onKickedOffline()
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.
onUserSigExpired()
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.
onSelfInfoUpdated(info:)
func onSelfInfoUpdated(info: V2TIMUserFullInfo)
The profile of the current user was updated
onUserStatusChanged(userStatusList:)
func onUserStatusChanged(userStatusList: Array<V2TIMUserStatus>)
The status of a user changed.
-
- The status (including online status and custom status) of a subscribed user changed.
-
- The status (including online status and custom status) of a friend changed (if the user has enabled friend status change notifications in the console).
-
- When an account is logged into multiple devices, and the custom status of one of the devices changes, all devices will receive this callback.
onConnectSuccess()
func onConnectSuccess()
The SDK is successfully connected to the CVM instance
onUserInfoChanged(userInfoList:)
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.
onAllReceiveMessageOptChanged(receiveMessageOptInfo:)
func onAllReceiveMessageOptChanged(receiveMessageOptInfo: V2TIMReceiveMessageOptInfo)
The message receiving options for all conversations changed.
onExperimentalNotify(key:param:)
func onExperimentalNotify(key: String, param: AnyObject)
Experimental event notification