Skip to main content

deleteFriend

Description

info

Delete a friend.

Note

(1) Because it is a two-way friendship, this function only removes the other party from your own friend list;
(2) Deleting a friend will not automatically delete the conversation. To delete the conversation, you can call the function to delete the conversation.

Related callbacks:
onFriendDeleted

Function Prototype


- (void)deleteFriend:(NSString *)friendUserID
onSuccess:(nullable OIMSuccessCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeRequiredDescription
friendUserIDNSStringYesUser ID

Return Result

Parameter NameParameter TypeDescription
onSuccessOIMSuccessCallbackSuccess
onFailureOIMFailureCallbackFailure

Code Example


[OIMManager.manager deleteFriend:@""
onSuccess:^(NSString * _Nullable data) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];