Skip to main content

deleteFriend

Feature Description

Note

Delete a friend.

Warning

(1) Due to the mutual nature of friendships, this function only removes the other party from one's own friend list; (2) Deleting a friend does not automatically delete the conversation. To delete the conversation, you can call the function to delete the conversation.

Relevant callback: onFriendDeleted

Function Prototype


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

Input Parameters

Parameter NameData TypeMandatoryDescription
friendUserIDNSStringYesUser ID

Return Results

Parameter NameData TypeDescription
onSuccessOIMSuccessCallbackSuccess
onFailureOIMFailureCallbackFailure

Code Example


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