Browse SDKs · iOS
Platform
SDKsiOS

Retrieve specified group profiles

Retrieve iOS group profiles by group ID.

Copy

Invoke getSpecifiedGroupsInfo:onSuccess:onFailure: to query detailed profile snapshots for specified group IDs in a batch:

Parameters

ParameterTypeRequiredDescription
groupsIDNSArray<NSString *> *YesList of target group IDs to query.

Code example

[[OIMManager manager] getSpecifiedGroupsInfo:@[@"group_1001", @"group_1002"]
                                   onSuccess:^(NSArray<OIMGroupInfo *> *groups) {
                                       [groupStore mergeGroups:groups];
                                   }
                                   onFailure:^(NSInteger code, NSString *message) {
                                       NSLog(@"getSpecifiedGroupsInfo failed: %ld %@", (long)code, message);
                                   }];

Return value

The onSuccess callback delivers an array of matched OIMGroupInfo objects (NSArray<OIMGroupInfo *> *). When retrieving a single group, pass an array containing one ID and read the first result item; an empty array indicates that no matching groups were found.

State changes after the call

  1. Snapshot query: This method retrieves an instantaneous profile snapshot without triggering group delegate callbacks.
  2. Local cache update: The client updates local cached group records using groupID as the primary key.
  3. Event notification: Subsequent group profile updates across sessions broadcast via onGroupInfoChanged:. For listener setup, refer to Groups overview.