Browse SDKs · iOS
SDKsiOS

Groups overview

Understand group profiles, members, applications, roles, and group events in OpenIM iOS SDK.

Copy

OpenIMSDK uses groups to hold shared profiles, membership, and permissions for multi-user chats. groupID is the stable group identifier used to send group messages, retrieve group profiles, administer members, and process join applications. A group conversation in the chat list is still managed by conversationID; do not use the two identifiers interchangeably.

Core data types

TypePurpose
OIMGroupInfoThe group name, avatar, announcement, owner, verification settings, member count, and extension field.
OIMGroupMemberInfoA user's nickname, role, mute state, and join information within one group.
OIMGroupApplicationInfoA group application and its handling state.

Group roles use OIMGroupMemberRole: a regular member is OIMGroupMemberRoleMember (20), an administrator is OIMGroupMemberRoleAdmin (60), and the owner is OIMGroupMemberRoleOwner (100). The UI can use these values to control available actions, but OpenIMServer performs the final permission checks.

Group profile and lifecycle

Group members and applications

Group moderation

State updates

This page owns the complete handlers for group-profile changes, the current user joining or leaving, and group dismissal:

- (void)startGroupEvents { [[OIMManager callbacker] addGroupListener:self]; }
- (void)stopGroupEvents { [[OIMManager callbacker] removeGroupListener:self]; }

- (void)onJoinedGroupAdded:(OIMGroupInfo *)group { [self upsertGroup:group]; }
- (void)onJoinedGroupDeleted:(OIMGroupInfo *)group { [self removeGroupID:group.groupID]; }
- (void)onGroupInfoChanged:(OIMGroupInfo *)group { [self upsertGroup:group]; }
- (void)onGroupDismissed:(OIMGroupInfo *)group { [self markDismissed:group.groupID]; }

Retain one stable OIMGroupListener object strongly and use the same instance when adding and removing it. Merge events idempotently by groupID. Handle a successful callback, incremental delegate update, and reconciliation query as separate stages.

Member events belong to Retrieve group members, while application events belong to Group applications.

Group APIs in OpenIM iOS SDK manage only OpenIMSDK group profiles, membership, and permissions. Public discovery, complex directories, and capacity governance for very large groups belong to your application backend and OpenIMServer configuration; do not represent them as nonexistent client-side group types.