Browse SDKs · iOS
SDKsiOS

Accept a friend request

Accept a friend request with OpenIM iOS SDK.

Copy
[[OIMManager manager] acceptFriendApplication:applicantUserID
                                     handleMsg:@"Accepted"
                                     onSuccess:nil
                                     onFailure:nil];

The first argument is the applicant's user ID, and handleMsg is the response message. A successful callback means that the accept request has completed. The updated request status and the new friend relationship may subsequently arrive through different delegates; merge them by the request key and userID, respectively.