Browse SDKs · iOS
Platform
SDKsiOS

Retrieve the group owner and administrators

Retrieve the owner and administrators of an iOS group.

Copy

Invoke getGroupMemberOwnerAndAdmin:onSuccess:onFailure: to quickly query the group owner and all administrators:

Parameters

ParameterTypeRequiredDescription
groupIDNSString *YesTarget group ID.

Code example

[[OIMManager manager] getGroupMemberOwnerAndAdmin:@"group_1001"
                                        onSuccess:^(NSArray<OIMGroupMemberInfo *> *members) {
                                            [self replaceOwnerAndAdmins:members];
                                        }
                                        onFailure:^(NSInteger code, NSString *message) {
                                            NSLog(@"getGroupMemberOwnerAndAdmin failed: %ld %@", (long)code, message);
                                        }];

Return value

The onSuccess callback delivers an array of OIMGroupMemberInfo models (NSArray<OIMGroupMemberInfo *> *) containing the group owner and all active administrators.

State changes after the call

  1. Management snapshot: This method provides a direct way to render the group administration team without traversing or paginating through the full member roster.
  2. Event notification: Role changes and ownership transfers broadcast via onGroupMemberInfoChanged:. The client updates the corresponding member record matching groupID:userID. For listener setup, refer to Group member queries overview.