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.
V2TIMGroupInfoabstract
Swift - V2TIMGroupInfo
Swift

Class V2TIMGroup​Info

public class V2TIMGroupInfo  

Definition of V2TIMGroupInfo

Initializers

init()

public init()  

Properties

description

public var description: String  

group​ID

public var groupID: String?  

Group ID

group​Type

public var groupType: String?  

Group type

is​Support​Topic

public var isSupportTopic: Bool  

Whether to enable topic creation for a community group

group​Name

public var groupName: String?  

Group name

notification

public var notification: String?  

Group notice

introduction

public var introduction: String?  

Group introduction

face​URL

public var faceURL: String?  

Group profile photo URL

all​Muted

public var allMuted: Bool  

Whether to mute all group members

custom​Info

public var customInfo: Dictionary<String, Data>?  

Get custom group fields

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

1. Go to the [console](https://console.tencentcloud.com/im) (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. - Warning: 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

public var owner: String  

Group owner ID

create​Time

public var createTime: UInt  

UTC timestamp of group creation

group​Add​Opt

public var groupAddOpt: V2TIMGroupAddOpt  

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.

group​Approve​Opt

public var groupApproveOpt: V2TIMGroupAddOpt  

The approval method of the administrator in the group invitation mode (Supported in 7.1 and later versions)

  • Except for work group, the default value of all other group types is V2TIM_ GROUP_ ADD_ FORBID (that is, users are not allowed to join the group through invitation). You can modify this field to open it.

  • This field is not supported in AVChatRoom、Community and Topics.

last​Info​Time

public var lastInfoTime: UInt  

Get the UTC timestamp when the group information was last modified

last​Message​Time

public var lastMessageTime: UInt  

Get the last time a message was sent in the group

member​Count

public var memberCount: UInt  

Number of members that have joined the group

online​Count

@available(*, deprecated, message: "use getGroupOnlineMemberCount(groupID:succ:fail:) instead")
    public var onlineCount: UInt  

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

member​Max​Count

public var memberMaxCount: UInt  

Maximum number of group members allowed to join

role

public var role: UInt  

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

recv​Opt

public var recvOpt: V2TIMReceiveMessageOpt  

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

join​Time

public var joinTime: UInt  

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

enable​Permission​Group

public var enablePermissionGroup: Bool  

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.

default​Permissions

public var defaultPermissions: UInt64  

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 = true).