Browse SDKs · iOS
SDKsiOS

Retrieve the unhandled friend-request count

Retrieve the number of unhandled friend requests on iOS.

Copy
GetFriendApplicationUnhandledCountReq *req = [GetFriendApplicationUnhandledCountReq new];
req.time = lastViewedAt;
[[OIMManager manager] getFriendApplicationUnhandledCount:req
                                               onSuccess:^(NSInteger count) {
                                                   [requestStore setUnhandledCount:count];
                                               }
                                               onFailure:nil];

time is normally the time when the user last viewed the friend-request list. The success callback returns a snapshot of the number of matching unhandled requests after that time. The query itself does not trigger a friend-request delegate.