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+Communityabstract
Swift - V2TIMManager
Swift

Extensions on V2TIMManager

Methods

add​Community​Listener(listener:​)

public func addCommunityListener(listener: V2TIMCommunityListener)  

1.1 Add the community listener

remove​Community​Listener(listener:​)

public func removeCommunityListener(listener: V2TIMCommunityListener)  

1.2 Remove the community listener

create​Community(info:​member​List:​succ:​fail:​)

public func createCommunity(info: V2TIMGroupInfo, memberList: Array<V2TIMCreateGroupMemberInfo>?, succ: V2TIMCreateGroupSucc?, fail: V2TIMFail?)  

Community-Topic

2.1 Create a community that supports topics

get​Joined​Community​List(succ:​fail:​)

public func getJoinedCommunityList(succ: @escaping V2TIMGroupInfoListSucc, fail: @escaping V2TIMFail)  

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

create​Topic​InCommunity(group​ID:​topic​Info:​succ:​fail:​)

public func createTopicInCommunity(groupID: String, topicInfo: V2TIMTopicInfo, succ: V2TIMCreateTopicSucc?, fail: V2TIMFail?)  

2.3 Create topic

Parameters

group​ID String

The community ID must start with @TGS#_.

delete​Topic​From​Community(group​ID:​topic​IDList:​succ:​fail:​)

public func deleteTopicFromCommunity(groupID: String, topicIDList: Array<String>, succ: V2TIMTopicOperationResultSucc?, fail: V2TIMFail?)  

2.4 Delete topic

set​Topic​Info(topic​Info:​succ:​fail:​)

public func setTopicInfo(topicInfo: V2TIMTopicInfo, succ: V2TIMSucc?, fail: V2TIMFail?)  

2.5 Modify topic information

get​Topic​Info​List(group​ID:​topic​IDList:​succ:​fail:​)

public func getTopicInfoList(groupID: String, topicIDList: Array<String>?, succ: @escaping V2TIMTopicInfoResultListSucc, fail: @escaping V2TIMFail)  

2.6 Get topic list

create​Permission​Group​InCommunity(permission​Group​Info:​succ:​fail:​)

public func createPermissionGroupInCommunity(permissionGroupInfo: V2TIMPermissionGroupInfo, succ: V2TIMCreatePermissionGroupSucc?, fail: V2TIMFail?)  

PermissionGroup

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

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

delete​Permission​Group​From​Community(group​ID:​permission​Group​IDList:​succ:​fail:​)

public func deletePermissionGroupFromCommunity(groupID: String, permissionGroupIDList: Array<String>, succ: V2TIMPermissionGroupOperationResultSucc?, fail: V2TIMFail?)  

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

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

modify​Permission​Group​Info​InCommunity(permission​Group​Info:​succ:​fail:​)

public func modifyPermissionGroupInfoInCommunity(permissionGroupInfo: V2TIMPermissionGroupInfo, succ: V2TIMSucc?, fail: V2TIMFail?)  

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

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

get​Joined​Permission​Group​List​InCommunity(group​ID:​succ:​fail:​)

public func getJoinedPermissionGroupListInCommunity(groupID: String, succ: @escaping V2TIMPermissionGroupInfoResultListSucc, fail: @escaping V2TIMFail)  

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

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

get​Permission​Group​List​InCommunity(group​ID:​permission​Group​IDList:​succ:​fail:​)

public func getPermissionGroupListInCommunity(groupID: String, permissionGroupIDList: Array<String>, succ: @escaping V2TIMPermissionGroupInfoResultListSucc, fail: @escaping V2TIMFail)  

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

  • 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.

add​Community​Members​ToPermission​Group(group​ID:​permission​Group​ID:​member​List:​succ:​fail:​)

public func addCommunityMembersToPermissionGroup(groupID: String, permissionGroupID: String, memberList: Array<String>, succ: V2TIMPermissionGroupMemberOperationResultListSucc?, fail: V2TIMFail?)  

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

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

remove​Community​Members​From​Permission​Group(group​ID:​permission​Group​ID:​member​List:​succ:​fail:​)

public func removeCommunityMembersFromPermissionGroup(groupID: String, permissionGroupID: String, memberList: Array<String>, succ: V2TIMPermissionGroupMemberOperationResultListSucc?, fail: V2TIMFail?)  

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

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

get​Community​Member​List​InPermission​Group(group​ID:​permission​Group​ID:​next​Cursor:​succ:​fail:​)

public func getCommunityMemberListInPermissionGroup(groupID: String, permissionGroupID: String, nextCursor: String, succ: @escaping V2TIMPermissionGroupMemberInfoResultListSucc, fail: @escaping V2TIMFail)  

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

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

add​Topic​Permission​ToPermission​Group(group​ID:​permission​Group​ID:​topic​Permission​Map:​succ:​fail:​)

public func addTopicPermissionToPermissionGroup(groupID: String, permissionGroupID: String, topicPermissionMap: Dictionary<String, NSNumber>, succ: @escaping V2TIMTopicOperationResultSucc, fail: @escaping V2TIMFail)  

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

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

delete​Topic​Permission​From​Permission​Group(group​ID:​permission​Group​ID:​topic​IDList:​succ:​fail:​)

public func deleteTopicPermissionFromPermissionGroup(groupID: String, permissionGroupID: String, topicIDList: Array<String>, succ: @escaping V2TIMTopicOperationResultSucc, fail: @escaping V2TIMFail)  

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

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

modify​Topic​Permission​InPermission​Group(group​ID:​permission​Group​ID:​topic​Permission​Map:​succ:​fail:​)

public func modifyTopicPermissionInPermissionGroup(groupID: String, permissionGroupID: String, topicPermissionMap: Dictionary<String, NSNumber>, succ: @escaping V2TIMTopicOperationResultSucc, fail: @escaping V2TIMFail)  

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

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

get​Topic​Permission​InPermission​Group(group​ID:​permission​Group​ID:​topic​IDList:​succ:​fail:​)

public func getTopicPermissionInPermissionGroup(groupID: String, permissionGroupID: String, topicIDList: Array<String>, succ: @escaping V2TIMTopicPermissionResultSucc, fail: @escaping V2TIMFail)  

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

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