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.
V2TIMFriendshipListenerabstract
Swift - V2TIMFriendshipListener
Swift

Protocol V2TIMFriendship​Listener

public protocol V2TIMFriendshipListener: AnyObject  

Definition of V2TIMFriendshipListener

V2TIMFriendshipListener V2TIMFriendshipListener AnyObject AnyObject V2TIMFriendshipListener->AnyObject

Conforms To

AnyObject

Requirements

on​Friend​Application​List​Added(application​List:​)

func onFriendApplicationListAdded(applicationList: Array<V2TIMFriendApplication>) 

New friend request notification. You will receive this callback in the following cases:

  1. You send a friend request to others.
  2. You receive a friend request from others.

on​Friend​Application​List​Deleted(user​IDList:​)

func onFriendApplicationListDeleted(userIDList: Array<String>) 

Friend request deletion notification. You will receive this callback in the following cases:

  1. You call deleteFriendApplication to proactively delete a friend request.
  2. You call refuseFriendApplication to reject a friend request.
  3. You call acceptFriendApplication to accept a friend request and the acceptance type is V2TIM_FRIEND_ACCEPT_AGREE.
  4. Your friend request is rejected by others.

on​Friend​Application​List​Read()

func onFriendApplicationListRead() 

Friend request read receipts. If you have called setFriendApplicationRead to set read receipts for friend requests, you will receive this callback (mainly used for multi-device synchronization).

on​Friend​List​Added(info​List:​)

func onFriendListAdded(infoList: Array<V2TIMFriendInfo>) 

New friend notification

on​Friend​List​Deleted(user​IDList:​)

func onFriendListDeleted(userIDList: Array<String>) 

Friend deletion notification. You will receive this callback in the following cases:

  1. You delete a friend (received for one-way or two-way friend deletion).
  2. You are deleted by a friend (received for two-way friend deletion).

on​Black​List​Added(info​List:​)

func onBlackListAdded(infoList: Array<V2TIMFriendInfo>) 

New blocklist notification

on​Black​List​Deleted(user​IDList:​)

func onBlackListDeleted(userIDList: Array<String>) 

Blocklist deletion notification

on​Friend​Profile​Changed(info​List:​)

func onFriendProfileChanged(infoList: Array<V2TIMFriendInfo>) 

Friend profile update notification

on​Friend​Group​Created(group​Name:​friend​Info​List:​)

func onFriendGroupCreated(groupName: String, friendInfoList: Array<V2TIMFriendInfo>) 

Notification of friend group creation

on​Friend​Group​Deleted(group​Name​List:​)

func onFriendGroupDeleted(groupNameList: Array<String>) 

Notification of friend group deletion

on​Friend​Group​Name​Changed(old​Group​Name:​new​Group​Name:​)

func onFriendGroupNameChanged(oldGroupName: String, newGroupName: String) 

Notification of friend group name changes

on​Friends​Added​ToGroup(group​Name:​friend​Info​List:​)

func onFriendsAddedToGroup(groupName: String, friendInfoList: Array<V2TIMFriendInfo>) 

Notification of adding friends to a friend group

on​Friends​Deleted​From​Group(group​Name:​friend​IDList:​)

func onFriendsDeletedFromGroup(groupName: String, friendIDList: Array<String>) 

Notification of deleting friends from a friend group

on​Official​Account​Subscribed(official​Account​Info:​)

func onOfficialAccountSubscribed(officialAccountInfo: V2TIMOfficialAccountInfo) 

Notification for subscribing to an official account.

on​Official​Account​Unsubscribed(official​Account​ID:​)

func onOfficialAccountUnsubscribed(officialAccountID: String) 

Notification for unsubscribing from an official account.

on​Official​Account​Deleted(official​Account​ID:​)

func onOfficialAccountDeleted(officialAccountID: String) 

Notification for a subscribed official account being deleted.

on​Official​Account​Info​Changed(official​Account​Info:​)

func onOfficialAccountInfoChanged(officialAccountInfo: V2TIMOfficialAccountInfo) 

Notification for the updated information of a subscribed official account.

on​MyFollowing​List​Changed(user​Info​List:​is​Add:​)

func onMyFollowingListChanged(userInfoList: Array<V2TIMUserFullInfo>, isAdd: Bool) 

Notification of changes to the following list

on​MyFollowers​List​Changed(user​Info​List:​is​Add:​)

func onMyFollowersListChanged(userInfoList: Array<V2TIMUserFullInfo>, isAdd: Bool) 

Notification of changes to the followers list

on​Mutual​Followers​List​Changed(user​Info​List:​is​Add:​)

func onMutualFollowersListChanged(userInfoList: Array<V2TIMUserFullInfo>, isAdd: Bool) 

Notification of changes to the mutual followers list