SDKsiOS
Retrieve specified group profiles
Retrieve iOS group profiles by group ID.
Invoke getSpecifiedGroupsInfo:onSuccess:onFailure: to query detailed profile snapshots for specified group IDs in a batch:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupsID | NSArray<NSString *> * | Yes | List 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
- Snapshot query: This method retrieves an instantaneous profile snapshot without triggering group delegate callbacks.
- Local cache update: The client updates local cached group records using
groupIDas the primary key. - Event notification: Subsequent group profile updates across sessions broadcast via
onGroupInfoChanged:. For listener setup, refer to Groups overview.
Was this page helpful?