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.
V2TIMManager(Community)

Instance Methods

(void) - addCommunityListener:
 
(void) - removeCommunityListener:
 
(void) - createCommunity:memberList:succ:fail:
 
(void) - getJoinedCommunityList:fail:
 
(void) - createTopicInCommunity:topicInfo:succ:fail:
 
(void) - deleteTopicFromCommunity:topicIDList:succ:fail:
 
(void) - setTopicInfo:succ:fail:
 
(void) - getTopicInfoList:topicIDList:succ:fail:
 
(void) - createPermissionGroupInCommunity:succ:fail:
 
(void) - deletePermissionGroupFromCommunity:permissionGroupIDList:succ:fail:
 
(void) - modifyPermissionGroupInfoInCommunity:succ:fail:
 
(void) - getJoinedPermissionGroupListInCommunity:succ:fail:
 
(void) - getPermissionGroupListInCommunity:permissionGroupIDList:succ:fail:
 
(void) - addCommunityMembersToPermissionGroup:permissionGroupID:memberList:succ:fail:
 
(void) - removeCommunityMembersFromPermissionGroup:permissionGroupID:memberList:succ:fail:
 
(void) - getCommunityMemberListInPermissionGroup:permissionGroupID:nextCursor:succ:fail:
 
(void) - addTopicPermissionToPermissionGroup:permissionGroupID:topicPermissionMap:succ:fail:
 
(void) - deleteTopicPermissionFromPermissionGroup:permissionGroupID:topicIDList:succ:fail:
 
(void) - modifyTopicPermissionInPermissionGroup:permissionGroupID:topicPermissionMap:succ:fail:
 
(void) - getTopicPermissionInPermissionGroup:permissionGroupID:topicIDList:succ:fail:
 

Member Typedef Documentation

◆ V2TIMTopicOperationResultSucc

- (typedef void(^ V2TIMTopicOperationResultSucc) (NSMutableArray< V2TIMTopicOperationResult * > *resultList))
protected

Callback definition on operation topic.

◆ V2TIMTopicInfoResultListSucc

- (typedef void(^ V2TIMTopicInfoResultListSucc) (NSMutableArray< V2TIMTopicInfoResult * > *resultList))
protected

Callback definition on get topic info list.

◆ V2TIMCreateTopicSucc

- (typedef void(^ V2TIMCreateTopicSucc) (NSString *topicID))
protected

Callback definition on create topic.

◆ V2TIMCreatePermissionGroupSucc

- (typedef void(^ V2TIMCreatePermissionGroupSucc) (NSString *permissionGroupID))
protected

Callback definition on create permission group.

◆ V2TIMPermissionGroupOperationResultSucc

- (typedef void(^ V2TIMPermissionGroupOperationResultSucc) (NSMutableArray< V2TIMPermissionGroupOperationResult * > *resultList))
protected

Callback definition on operate permission group.

◆ V2TIMPermissionGroupInfoResultListSucc

- (typedef void(^ V2TIMPermissionGroupInfoResultListSucc) (NSMutableArray< V2TIMPermissionGroupInfoResult * > *resultList))
protected

Callback definition on get permission group list.

◆ V2TIMPermissionGroupMemberOperationResultListSucc

- (typedef void(^ V2TIMPermissionGroupMemberOperationResultListSucc) (NSMutableArray< V2TIMPermissionGroupMemberOperationResult * > *resultList))
protected

Callback definition on operate permission group member list.

◆ V2TIMPermissionGroupMemberInfoResultListSucc

- (typedef void(^ V2TIMPermissionGroupMemberInfoResultListSucc) (NSString *nextCursor, NSMutableArray< V2TIMGroupMemberFullInfo * > *resultList))
protected

Callback definition on get permission group member list.

◆ V2TIMTopicPermissionResultSucc

- (typedef void(^ V2TIMTopicPermissionResultSucc) (NSMutableArray< V2TIMTopicPermissionResult * > *resultList))
protected

Callback definition on get topic permission list.

Member Enumeration Documentation

◆ V2TIMCommunityPermissionValue

- (enum V2TIMCommunityPermissionValue) :
protected

Enumeration definition of community permission.

Enumerator
V2TIM_COMMUNITY_PERMISSION_MANAGE_GROUP_INFO 

Permission to modify group information. If this is set to 0, the members do not have this permission. If it is set to 1, the members have this permission.

V2TIM_COMMUNITY_PERMISSION_MANAGE_GROUP_MEMBER 

Group member management permissions, including removing members, approving new member requests, modifying member profile, etc. If this is set to 0, the members do not have the permission. If it is set to 1, the members have the permissions.

V2TIM_COMMUNITY_PERMISSION_MANAGE_PERMISSION_GROUP_INFO 

Permissions to manage permission groups, including creating, modifying, and deleting permission groups and topic permissions. If it is set to 0, the members do not have the permissions. If it is set to 1, the members have the permissions.

V2TIM_COMMUNITY_PERMISSION_MANAGE_PERMISSION_GROUP_MEMBER 

Permissions to manage permission group members, including inviting new members and removing existing members, etc. If it is set to 0, the members do not have the permissions. If it is set to 1, the members have the permissions.

V2TIM_COMMUNITY_PERMISSION_MANAGE_TOPIC_IN_COMMUNITY 

Topic management permissions, including creating, modifying, and deleting topics, etc. If it is set to 0, the members do not have the permissions. If it is set to 1, the members have the permissions.

V2TIM_COMMUNITY_PERMISSION_MUTE_MEMBER 

Permission to mute a group member in all community topics. If it is set to 0, the members do not have the permissions. If it is set to 1, the members have the permissions.

V2TIM_COMMUNITY_PERMISSION_SEND_MESSAGE 

Permission to send messages in all community topics. If it is set to 0, the members do not have the permission. If it is set to 1, the members have the permission.

V2TIM_COMMUNITY_PERMISSION_AT_ALL 

Permission to send @all messages in all community topics. If it is set to 0, the members do not have the permission. If it is set to 1, the members have the permission.

V2TIM_COMMUNITY_PERMISSION_GET_HISTORY_MESSAGE 

Permission to pull messages sent in all community topics before joining the group. If it is set to 0, the members do not have the permission. If it is set to 1, the members have the permission.

V2TIM_COMMUNITY_PERMISSION_REVOKE_OTHER_MEMBER_MESSAGE 

Permission to recall others' messages in all community topics. If it is set to 0, the members do not have the permission. If it is set to 1, the members have the permission.

V2TIM_COMMUNITY_PERMISSION_BAN_MEMBER 

Permission to ban a group member. If this is set to 0, the members do not have this permission. If it is set to 1, the members have this permission.

◆ V2TIMTopicPermissionValue

- (enum V2TIMTopicPermissionValue) :
protected

Enumeration definition of topic permission.

Enumerator
V2TIM_TOPIC_PERMISSION_MANAGE_TOPIC 

Permissions to manage the current topic, including modifying topic information and deleting the topic. If it is set to 0, the members do not have the permissions. If it is set to 1, the members have the permissions.

V2TIM_TOPIC_PERMISSION_MANAGE_TOPIC_PERMISSION 

Permissions to manage topic permissions in the current topic, including adding, modifying, and removing topic permissions. If it is set to 0, the members do not have the permissions. If it is set to 1, the members have the permissions.

V2TIM_TOPIC_PERMISSION_MUTE_MEMBER 

Permission to mute members in the current topic. If it is set to 0, the members do not have the permission. If it is set to 1, the members have the permission.

V2TIM_TOPIC_PERMISSION_SEND_MESSAGE 

Permission to send messages in the current topic. If it is set to 0, the members do not have the permission. If it is set to 1, the members have the permission.

V2TIM_TOPIC_PERMISSION_GET_HISTORY_MESSAGE 

Permission to pull messages sent in the current topic before joining the group. If it is set to 0, the members do not have the permission. If it is set to 1, the members have the permission.

V2TIM_TOPIC_PERMISSION_REVOKE_OTHER_MEMBER_MESSAGE 

Permission to recall others' messages in the current topic. If it is set to 0, the members do not have the permission. If it is set to 1, the members have the permission.

V2TIM_TOPIC_PERMISSION_AT_ALL 

Permission to send @all messages in the current topic. If it is set to 0, the members do not have the permission. If it is set to 1, the members have the permission.

Method Documentation

◆ addCommunityListener:()

- (void) addCommunityListener: (addCommunityListener(listener:))  NS_SWIFT_NAME

1.1 Add the community listener.

◆ removeCommunityListener:()

- (void) removeCommunityListener: (removeCommunityListener(listener:))  NS_SWIFT_NAME

1.2 Remove the community listener.

◆ createCommunity:memberList:succ:fail:()

- (void) createCommunity: (V2TIMGroupInfo *)  info
memberList: (NSArray< V2TIMCreateGroupMemberInfo * > *)  memberList
succ: (V2TIMCreateGroupSucc)  succ
fail: (V2TIMFail)  fail 

2.1 Create a community that supports topics

◆ getJoinedCommunityList:fail:()

- (void) getJoinedCommunityList: (V2TIMGroupInfoListSucc)  succ
fail: (V2TIMFail)  fail 

2.1 Get the list of Community-groups that the current user has joined

◆ createTopicInCommunity:topicInfo:succ:fail:()

- (void) createTopicInCommunity: (NSString *)  groupID
topicInfo: (V2TIMTopicInfo *)  topicInfo
succ: (V2TIMCreateTopicSucc succ
fail: (V2TIMFail)  fail 

2.2 Create topic

Parameters
groupIDThe community ID must start with @TGS_.

◆ deleteTopicFromCommunity:topicIDList:succ:fail:()

- (void) deleteTopicFromCommunity: (NSString *)  groupID
topicIDList: (NSArray< NSString * > *)  topicIDList
succ: (V2TIMTopicOperationResultSucc succ
fail: (V2TIMFail)  fail 

2.3 Delete topic

◆ setTopicInfo:succ:fail:()

- (void) setTopicInfo: (V2TIMTopicInfo *)  topicInfo
succ: (V2TIMSucc)  succ
fail: (V2TIMFail)  fail 

2.4 Modify topic information

◆ getTopicInfoList:topicIDList:succ:fail:()

- (void) getTopicInfoList: (NSString *)  groupID
topicIDList: (NSArray< NSString * > *)  topicIDList
succ: (V2TIMTopicInfoResultListSucc succ
fail: (V2TIMFail)  fail 

2.5 Get topic list

Attention
: When the topicIDList is empty,it means to get the list of all topics in this Community.

◆ createPermissionGroupInCommunity:succ:fail:()

- (void) createPermissionGroupInCommunity: (V2TIMPermissionGroupInfo *)  permissionGroupInfo
succ: (V2TIMCreatePermissionGroupSucc succ
fail: (V2TIMFail)  fail 

3.1 Create community permission group(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ deletePermissionGroupFromCommunity:permissionGroupIDList:succ:fail:()

- (void) deletePermissionGroupFromCommunity: (NSString *)  groupID
permissionGroupIDList: (NSArray< NSString * > *)  permissionGroupIDList
succ: (V2TIMPermissionGroupOperationResultSucc succ
fail: (V2TIMFail)  fail 

3.2 Delete community permission group(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ modifyPermissionGroupInfoInCommunity:succ:fail:()

- (void) modifyPermissionGroupInfoInCommunity: (V2TIMPermissionGroupInfo *)  permissionGroupInfo
succ: (V2TIMSucc)  succ
fail: (V2TIMFail)  fail 

3.3 Modify community permission group(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ getJoinedPermissionGroupListInCommunity:succ:fail:()

- (void) getJoinedPermissionGroupListInCommunity: (NSString *)  groupID
succ: (V2TIMPermissionGroupInfoResultListSucc succ
fail: (V2TIMFail)  fail 

3.4 Get joined community permission group list(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ getPermissionGroupListInCommunity:permissionGroupIDList:succ:fail:()

- (void) getPermissionGroupListInCommunity: (NSString *)  groupID
permissionGroupIDList: (NSArray< NSString * > *)  permissionGroupIDList
succ: (V2TIMPermissionGroupInfoResultListSucc succ
fail: (V2TIMFail)  fail 

3.5 Get community permission group list(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.
  • When permissionGroupIDList is empty, get all the permission groups; when it is not empty, get the specified permission groups.

◆ addCommunityMembersToPermissionGroup:permissionGroupID:memberList:succ:fail:()

- (void) addCommunityMembersToPermissionGroup: (NSString *)  groupID
permissionGroupID: (NSString *)  permissionGroupID
memberList: (NSArray< NSString * > *)  memberList
succ: (V2TIMPermissionGroupMemberOperationResultListSucc succ
fail: (V2TIMFail)  fail 

3.6 Add members to community permission group(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ removeCommunityMembersFromPermissionGroup:permissionGroupID:memberList:succ:fail:()

- (void) removeCommunityMembersFromPermissionGroup: (NSString *)  groupID
permissionGroupID: (NSString *)  permissionGroupID
memberList: (NSArray< NSString * > *)  memberList
succ: (V2TIMPermissionGroupMemberOperationResultListSucc succ
fail: (V2TIMFail)  fail 

3.7 Remove members from community permission group(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ getCommunityMemberListInPermissionGroup:permissionGroupID:nextCursor:succ:fail:()

- (void) getCommunityMemberListInPermissionGroup: (NSString *)  groupID
permissionGroupID: (NSString *)  permissionGroupID
nextCursor: (NSString *)  nextCursor
succ: (V2TIMPermissionGroupMemberInfoResultListSucc succ
fail: (V2TIMFail)  fail 

3.8 Get community permission group member list(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ addTopicPermissionToPermissionGroup:permissionGroupID:topicPermissionMap:succ:fail:()

- (void) addTopicPermissionToPermissionGroup: (NSString *)  groupID
permissionGroupID: (NSString *)  permissionGroupID
topicPermissionMap: (NSDictionary< NSString *, NSNumber * > *)  topicPermissionMap
succ: (V2TIMTopicOperationResultSucc succ
fail: (V2TIMFail)  fail 

3.9 Add topic permissions to the permission group(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ deleteTopicPermissionFromPermissionGroup:permissionGroupID:topicIDList:succ:fail:()

- (void) deleteTopicPermissionFromPermissionGroup: (NSString *)  groupID
permissionGroupID: (NSString *)  permissionGroupID
topicIDList: (NSArray< NSString * > *)  topicIDList
succ: (V2TIMTopicOperationResultSucc succ
fail: (V2TIMFail)  fail 

3.10 Delete topic permissions from the permission group(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ modifyTopicPermissionInPermissionGroup:permissionGroupID:topicPermissionMap:succ:fail:()

- (void) modifyTopicPermissionInPermissionGroup: (NSString *)  groupID
permissionGroupID: (NSString *)  permissionGroupID
topicPermissionMap: (NSDictionary< NSString *, NSNumber * > *)  topicPermissionMap
succ: (V2TIMTopicOperationResultSucc succ
fail: (V2TIMFail)  fail 

3.11 Modify the topic permissions in the permission group(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.

◆ getTopicPermissionInPermissionGroup:permissionGroupID:topicIDList:succ:fail:()

- (void) getTopicPermissionInPermissionGroup: (NSString *)  groupID
permissionGroupID: (NSString *)  permissionGroupID
topicIDList: (NSArray< NSString * > *)  topicIDList
succ: (V2TIMTopicPermissionResultSucc succ
fail: (V2TIMFail)  fail 

3.12 Get the topic permissions in the permission group(supported only in 7.8 and later versions)

Attention
  • You need to buy Premium Edition to use this feature.