IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMGroupInfo

Properties

NSString * groupID
 
NSString * groupType
 
BOOL isSupportTopic
 
NSString * groupName
 
NSString * notification
 
NSString * introduction
 
NSString * faceURL
 
BOOL allMuted
 
NSDictionary< NSString *, NSData * > * customInfo
 
NSString * owner
 
uint32_t createTime
 
V2TIMGroupAddOpt groupAddOpt
 
V2TIMGroupAddOpt groupApproveOpt
 
uint32_t lastInfoTime
 
uint32_t lastMessageTime
 
uint32_t memberCount
 
uint32_t onlineCount
 
uint32_t memberMaxCount
 
uint32_t role
 
V2TIMReceiveMessageOpt recvOpt
 
uint32_t joinTime
 
BOOL enablePermissionGroup
 
uint64_t defaultPermissions
 

Property Documentation

◆ groupID

- (NSString*) groupID
readwritenonatomicstrong

Group ID

Attention
A custom group ID must be printable ASCII characters (0x20-0x7e) with a maximum length of 48 bytes. To avoid confusion with the default group IDs assigned by Chat, do not start the custom ID with @TGS.

◆ groupType

- (NSString*) groupType
readwritenonatomicstrong

Group type.

◆ isSupportTopic

- (BOOL) isSupportTopic
readwritenonatomicassign

Whether to enable topic creation for a community group

◆ groupName

- (NSString*) groupName
readwritenonatomicstrong

Group name

Attention
The maximum length of the group name is 100 bytes, encoded in UTF-8.

◆ notification

- (NSString*) notification
readwritenonatomicstrong

Group notice

Attention
The maximum length of the group notice is 400 bytes, encoded in UTF-8.

◆ introduction

- (NSString*) introduction
readwritenonatomicstrong

Group introduction

Attention
The maximum length of the group introduction is 400 bytes, encoded in UTF-8.

◆ faceURL

- (NSString*) faceURL
readwritenonatomicstrong

Group profile photo URL

Attention
The maximum length of the group profile photo URL is 500 bytes, encoded in UTF-8.

◆ allMuted

- (BOOL) allMuted
readwritenonatomicassign

Whether to mute all group members.

◆ customInfo

- (NSDictionary<NSString *,NSData *>*) customInfo
readwritenonatomicstrong

Get custom group fields To set a custom group field, perform the following steps:

1. Go to the console (Configuration -> Group configuration -> Custom Group Field) to set the key (string, max 16 bytes) of the custom group field.

2. Call the setGroupInfo API to set the field. The field value is of the NSData type, with a maximum length of 512 bytes.

Attention
This field mainly serves to make V1 and V2 compatible with each other. If you are using V2, we recommend you use the initGroupAttributes API to set group attributes. It is more flexible to use, does not require console configuration, and supports a larger size (up to 16 KB).

◆ owner

- (NSString*) owner
readnonatomicstrong

Group owner ID.

◆ createTime

- (uint32_t) createTime
readnonatomicassign

UTC timestamp of group creation.

◆ groupAddOpt

- (V2TIMGroupAddOpt) groupAddOpt
readwritenonatomicassign

Get or set whether admin approval is required to join the group This API can be called during group creation or group information modification. For work groups, the default value is V2TIM_GROUP_ADD_FORBID (users cannot request to join the group), which can be modified.

◆ groupApproveOpt

- (V2TIMGroupAddOpt) groupApproveOpt
readwritenonatomicassign

Get or set the approval method for inviting new group members. This field can be set during group creation or group information modification. Except for work groups, the default value for all group types is V2TIM_GROUP_ADD_FORBID (no one can be invited to the group). For AVChatRoom, Community, and topics, the default value cannot be modified.

◆ lastInfoTime

- (uint32_t) lastInfoTime
readnonatomicassign

Get the UTC timestamp when the group information was last modified.

◆ lastMessageTime

- (uint32_t) lastMessageTime
readnonatomicassign

Get the last time a message was sent in the group.

◆ memberCount

- (uint32_t) memberCount
readnonatomicassign

Number of members that have joined the group.

◆ onlineCount

- (uint32_t) onlineCount
readnonatomicassign

Get the number of online group members (This has been deprecated. Please call getGroupOnlineMemberCount instead.)

◆ memberMaxCount

- (uint32_t) memberMaxCount
readnonatomicassign

Maximum number of group members allowed to join

Attention
For details on the number of members allowed for each group type, please see here.

◆ role

- (uint32_t) role
readnonatomicassign

Group member role of current user(V2TIMGroupMemberRole). To switch the role, please call the setGroupMemberRole API.

◆ recvOpt

- (V2TIMReceiveMessageOpt) recvOpt
readnonatomicassign

Current user's message receiving option in the group. To modify the group message receiving option, please call the setGroupReceiveMessageOpt API.

◆ joinTime

- (uint32_t) joinTime
readnonatomicassign

Get the time when the current user joined the group. The time is automatically generated by the system and cannot be modified.

◆ enablePermissionGroup

- (BOOL) enablePermissionGroup
readwritenonatomicassign

Whether to enable permission groups (only supported for community groups since v7.8) When permission groups are enabled, admin permissions will become invalid, and communities and topics will be managed by group permissions, topic permissions, and permission groups.

◆ defaultPermissions

- (uint64_t) defaultPermissions
readwritenonatomicassign

The default permissions (only supported for community groups since v7.8) This API sets the default permissions for group members who have not joined any permission groups (only when permission groups are enabled, i.e., enablePermissionGroup = YES).