Browse SDKs · iOS
Platform
SDKsiOS

Retrieve the unhandled group-application count

Retrieve the number of unhandled iOS group applications after a specified time.

Copy

Invoke getGroupApplicationUnhandledCount:onSuccess:onFailure: to count pending join applications submitted after a specific timestamp, typically used for badges and notification counters:

Parameters

ParameterTypeRequiredDescription
reqGetGroupApplicationUnhandledCountReq *YesRequest object containing the filter timestamp.

GetGroupApplicationUnhandledCountReq properties

ParameterTypeRequiredDescription
timeNSIntegerYesCutoff start timestamp for counting applications. Pass 0 to count all pending join applications.

Code example

GetGroupApplicationUnhandledCountReq *req =
    [[GetGroupApplicationUnhandledCountReq alloc] initWithTime:0];

[[OIMManager manager] getGroupApplicationUnhandledCount:req
                                              onSuccess:^(NSInteger count) {
                                                  [self updateApplicationBadge:count];
                                              }
                                              onFailure:^(NSInteger code, NSString *message) {
                                                  NSLog(@"getGroupApplicationUnhandledCount failed: %ld %@", (long)code, message);
                                              }];

Return value

The onSuccess callback delivers the total count of pending group applications as an NSInteger.

State changes after the call

  1. Read-only query: This method queries an aggregate count without modifying application status or triggering delegate callbacks.
  2. Operations and details: To inspect or resolve pending applications, refer to Retrieve received group applications and Group applications overview.