AgoraChatSDK 1.3.1
Instance Methods | List of all members
<IAgoraChatGroupManager> Protocol Reference

#import <IAgoraChatGroupManager.h>

Inheritance diagram for <IAgoraChatGroupManager>:

Instance Methods

(void) - addDelegate:delegateQueue:
 
(void) - removeDelegate:
 
(NSArray< AgoraChatGroup * > *_Nullable) - getJoinedGroups
 
(void) - cleanAllGroupsFromDB
 
(NSArray *) - getGroupsWithoutPushNotification:
 
(NSArray< AgoraChatGroup * > *_Nullable) - getJoinedGroupsFromServerWithPage:pageSize:error:
 
(AgoraChatCursorResult< AgoraChatGroup * > *_Nullable) - getPublicGroupsFromServerWithCursor:pageSize:error:
 
(void) - getPublicGroupsFromServerWithCursor:pageSize:completion:
 
(AgoraChatGroup *_Nullable) - searchPublicGroupWithId:error:
 
(void) - searchPublicGroupWithId:completion:
 
(void) - getJoinedGroupsCountFromServerWithCompletion:
 
(AgoraChatGroup *_Nullable) - createGroupWithSubject:description:invitees:message:setting:error:
 
(void) - createGroupWithSubject:description:invitees:message:setting:completion:
 
(AgoraChatGroup *_Nullable) - getGroupSpecificationFromServerWithId:error:
 
(AgoraChatGroup *_Nullable) - getGroupSpecificationFromServerWithId:fetchMembers:error:
 
(void) - getGroupSpecificationFromServerWithId:completion:
 
(void) - getGroupSpecificationFromServerWithId:fetchMembers:completion:
 
(AgoraChatCursorResult< NSString * > *) - getGroupMemberListFromServerWithId:cursor:pageSize:error:
 
(void) - getGroupMemberListFromServerWithId:cursor:pageSize:completion:
 
(NSArray< NSString * > *_Nullable) - getGroupBlacklistFromServerWithId:pageNumber:pageSize:error:
 
(void) - getGroupBlacklistFromServerWithId:pageNumber:pageSize:completion:
 
(NSArray< NSString * > *_Nullable) - getGroupMuteListFromServerWithId:pageNumber:pageSize:error:
 
(void) - getGroupMuteListFromServerWithId:pageNumber:pageSize:completion:
 
(void) - fetchGroupMuteListFromServerWithId:pageNumber:pageSize:completion:
 
(NSArray< AgoraChatGroupSharedFile * > *_Nullable) - getGroupFileListWithId:pageNumber:pageSize:error:
 
(void) - getGroupFileListWithId:pageNumber:pageSize:completion:
 
(NSArray *) - getGroupWhiteListFromServerWithId:error:
 
(void) - getGroupWhiteListFromServerWithId:completion:
 
(BOOL) - isMemberInWhiteListFromServerWithGroupId:error:
 
(void) - isMemberInWhiteListFromServerWithGroupId:completion:
 
(NSString *_Nullable) - getGroupAnnouncementWithId:error:
 
(void) - isMemberInMuteListFromServerWithGroupId:completion:
 
(void) - getGroupAnnouncementWithId:completion:
 
(AgoraChatGroup *_Nullable) - addOccupants:toGroup:welcomeMessage:error:
 
(void) - addMembers:toGroup:message:completion:
 
(AgoraChatGroup *_Nullable) - removeOccupants:fromGroup:error:
 
(void) - removeMembers:fromGroup:completion:
 
(AgoraChatGroup *_Nullable) - blockOccupants:fromGroup:error:
 
(void) - blockMembers:fromGroup:completion:
 
(AgoraChatGroup *_Nullable) - unblockOccupants:forGroup:error:
 
(void) - unblockMembers:fromGroup:completion:
 
(AgoraChatGroup *_Nullable) - changeGroupSubject:forGroup:error:
 
(void) - updateGroupSubject:forGroup:completion:
 
(AgoraChatGroup *_Nullable) - changeDescription:forGroup:error:
 
(void) - updateDescription:forGroup:completion:
 
(void) - leaveGroup:error:
 
(void) - leaveGroup:completion:
 
(AgoraChatError *) - destroyGroup:
 
(void) - destroyGroup:finishCompletion:
 
(AgoraChatGroup *_Nullable) - blockGroup:error:
 
(void) - blockGroup:completion:
 
(AgoraChatGroup *_Nullable) - unblockGroup:error:
 
(void) - unblockGroup:completion:
 
(AgoraChatGroup *_Nullable) - updateGroupOwner:newOwner:error:
 
(void) - updateGroupOwner:newOwner:completion:
 
(AgoraChatGroup *_Nullable) - addAdmin:toGroup:error:
 
(void) - addAdmin:toGroup:completion:
 
(AgoraChatGroup *_Nullable) - removeAdmin:fromGroup:error:
 
(void) - removeAdmin:fromGroup:completion:
 
(AgoraChatGroup *_Nullable) - muteMembers:muteMilliseconds:fromGroup:error:
 
(void) - muteMembers:muteMilliseconds:fromGroup:completion:
 
(AgoraChatGroup *_Nullable) - unmuteMembers:fromGroup:error:
 
(void) - unmuteMembers:fromGroup:completion:
 
(AgoraChatGroup *_Nullable) - muteAllMembersFromGroup:error:
 
(void) - muteAllMembersFromGroup:completion:
 
(AgoraChatGroup *_Nullable) - unmuteAllMembersFromGroup:error:
 
(void) - unmuteAllMembersFromGroup:completion:
 
(AgoraChatGroup *_Nullable) - addWhiteListMembers:fromGroup:error:
 
(void) - addWhiteListMembers:fromGroup:completion:
 
(AgoraChatGroup *_Nullable) - removeWhiteListMembers:fromGroup:error:
 
(void) - removeWhiteListMembers:fromGroup:completion:
 
(void) - uploadGroupSharedFileWithId:filePath:progress:completion:
 
(void) - downloadGroupSharedFileWithId:filePath:sharedFileId:progress:completion:
 
(AgoraChatGroup *_Nullable) - removeGroupSharedFileWithId:sharedFileId:error:
 
(void) - removeGroupSharedFileWithId:sharedFileId:completion:
 
(AgoraChatGroup *_Nullable) - updateGroupAnnouncementWithId:announcement:error:
 
(void) - updateGroupAnnouncementWithId:announcement:completion:
 
(AgoraChatGroup *_Nullable) - updateGroupExtWithId:ext:error:
 
(void) - updateGroupExtWithId:ext:completion:
 
(AgoraChatGroup *_Nullable) - joinPublicGroup:error:
 
(void) - joinPublicGroup:completion:
 
(AgoraChatGroup *_Nullable) - applyJoinPublicGroup:message:error:
 
(void) - requestToJoinPublicGroup:message:completion:
 
(AgoraChatError *) - acceptJoinApplication:applicant:
 
(void) - approveJoinGroupRequest:sender:completion:
 
(AgoraChatError *) - declineJoinApplication:applicant:reason:
 
(void) - declineJoinGroupRequest:sender:reason:completion:
 
(AgoraChatGroup *_Nullable) - acceptInvitationFromGroup:inviter:error:
 
(void) - acceptInvitationFromGroup:inviter:completion:
 
(AgoraChatError *) - declineInvitationFromGroup:inviter:reason:
 
(void) - declineGroupInvitation:inviter:reason:completion:
 
(void) - getJoinedGroupsFromServerWithPage:pageSize:needMemberCount:needRole:completion:
 
(AgoraChatError *) - ignoreGroupPush:ignore:
 
(void) - updatePushServiceForGroup:isPushEnabled:completion:
 
(AgoraChatError *) - ignoreGroupsPush:ignore:
 
(void) - updatePushServiceForGroups:isPushEnabled:completion:
 
(void) - setMemberAttribute:userId:attributes:completion:
 
(void) - fetchMemberAttribute:userId:completion:
 
(void) - fetchMembersAttributes:userIds:keys:completion:
 
(void) - getJoinedGroupsFromServerWithPage:pageSize:completion:
 

Detailed Description

@header IAgoraChatGroupManager.h @abstract This protocol defines the group operations.

Author
Hyphenate
Version
3.00 The group operations.

Method Documentation

◆ acceptInvitationFromGroup:inviter:completion:

- (void) acceptInvitationFromGroup: (NSString *_Nonnull)  aGroupId
inviter: (NSString *_Nonnull)  aUsername
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Accepts a group invitation.

This is an asynchronous method.

Parameters
aGroupIdThe group ID.
aUsernameThe user who initiates the invitation.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ acceptInvitationFromGroup:inviter:error:

- (AgoraChatGroup *_Nullable) acceptInvitationFromGroup: (NSString *_Nonnull)  aGroupId
inviter: (NSString *_Nonnull)  aUsername
error: (AgoraChatError **_Nullable)  pError 
required

Accepts a group invitation.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
aUsernameThe user who initiates the invitation.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ acceptJoinApplication:applicant:

- (AgoraChatError *) acceptJoinApplication: (NSString *_Nonnull)  aGroupId
applicant: (NSString *_Nonnull)  aUsername 
required

Accepts a group request.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
aUsernameThe user who sends the request for join the group.
Returns
Error

◆ addAdmin:toGroup:completion:

- (void) addAdmin: (NSString *_Nonnull)  aAdmin
toGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Adds group admin.

This is an asynchronous method.

Only the group owner can call this method.

Parameters
aAdminThe admin to be added.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ addAdmin:toGroup:error:

- (AgoraChatGroup *_Nullable) addAdmin: (NSString *_Nonnull)  aAdmin
toGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Adds group admin.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aAdminThe admin to be added.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ addDelegate:delegateQueue:

- (void) addDelegate: (id< AgoraChatGroupManagerDelegate > _Nonnull)  aDelegate
delegateQueue: (dispatch_queue_t _Nullable)  aQueue 
required

Adds delegate.

Parameters
aDelegateThe delegate to be added.
aQueue(optional) The queue of calling delegate methods. Pass in nil to run on main thread.

◆ addMembers:toGroup:message:completion:

- (void) addMembers: (NSArray< NSString * > *_Nonnull)  aUsers
toGroup: (NSString *_Nonnull)  aGroupId
message: (NSString *_Nullable)  aMessage
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Invites users to join a group.

Parameters
aUsersThe users who are invited to join the group.
aGroupIdThe group ID.
aMessageThe welcome message.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ addOccupants:toGroup:welcomeMessage:error:

- (AgoraChatGroup *_Nullable) addOccupants: (NSArray< NSString * > *_Nonnull)  aOccupants
toGroup: (NSString *_Nonnull)  aGroupId
welcomeMessage: (NSString *_Nullable)  aWelcomeMessage
error: (AgoraChatError **_Nullable)  pError 
required

Invites users to join a group.

This is a synchronous method and blocks the current thread.

Parameters
aOccupantsThe users who are invited.
aGroupIdThe group ID.
aWelcomeMessageThe welcome message.
pErrorThe error information if the method fails: Error.
Returns
The group instance. The SDK will return nil if fails.

◆ addWhiteListMembers:fromGroup:completion:

- (void) addWhiteListMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Adds members to the allowlist.

Only the chatroom owner or admin can call this method.

Parameters
aMembersThe members to be added to the allowlist.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ addWhiteListMembers:fromGroup:error:

- (AgoraChatGroup *_Nullable) addWhiteListMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Adds members to the allowlist.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aMembersThe members to be added to the allowlist.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ applyJoinPublicGroup:message:error:

- (AgoraChatGroup *_Nullable) applyJoinPublicGroup: (NSString *_Nonnull)  aGroupId
message: (NSString *_Nullable)  aMessage
error: (AgoraChatError **_Nullable)  pError 
required

The request to join a public group. The group style should be AgoraChatGroupStylePublicJoinNeedApproval.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe public group ID。
aMessageThe message in the request.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ approveJoinGroupRequest:sender:completion:

- (void) approveJoinGroupRequest: (NSString *_Nonnull)  aGroupId
sender: (NSString *_Nonnull)  aUsername
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Approves a group request.

Only the group owner can call this method.

This is an asynchronous method.

Parameters
aGroupIdThe group ID.
aUsernameThe user who sends the request for join the group.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ blockGroup:completion:

- (void) blockGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Blocks group messages, so the server blocks the messages from the group.

The group owner can't block the group's messages.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ blockGroup:error:

- (AgoraChatGroup *_Nullable) blockGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Blocks group messages. The server will block the messages from the group.

The group owner can't block the group's messages.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ blockMembers:fromGroup:completion:

- (void) blockMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Adds users to blocklist of the group.

Only the group owner can call this method.

Parameters
aMembersThe users to be added to the blockList.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ blockOccupants:fromGroup:error:

- (AgoraChatGroup *_Nullable) blockOccupants: (NSArray< NSString * > *_Nonnull)  aOccupants
fromGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Adds users to blocklist of the group.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aOccupantsThe users to be added to the blockList.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ changeDescription:forGroup:error:

- (AgoraChatGroup *_Nullable) changeDescription: (NSString *_Nullable)  aDescription
forGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Changes the group description.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aDescriptionThe new group description.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ changeGroupSubject:forGroup:error:

- (AgoraChatGroup *_Nullable) changeGroupSubject: (NSString *_Nullable)  aSubject
forGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Changes the subject of the group.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aSubjectThe new subject of the group.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ cleanAllGroupsFromDB

- (void) cleanAllGroupsFromDB
required

Clears the information of all groups in the local database.

◆ createGroupWithSubject:description:invitees:message:setting:completion:

- (void) createGroupWithSubject: (NSString *_Nullable)  aSubject
description: (NSString *_Nullable)  aDescription
invitees: (NSArray< NSString * > *_Nullable)  aInvitees
message: (NSString *_Nullable)  aMessage
setting: (AgoraChatGroupOptions *_Nullable)  aSetting
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Creates a group.

This is an asynchronous method.

Parameters
aSubjectThe subject of the group.
aDescriptionThe description of the group.
aInviteesThe members of the group. Do not include the creator.
aMessageThe invitation message.
aSettingThe group options.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ createGroupWithSubject:description:invitees:message:setting:error:

- (AgoraChatGroup *_Nullable) createGroupWithSubject: (NSString *_Nullable)  aSubject
description: (NSString *_Nullable)  aDescription
invitees: (NSArray< NSString * > *_Nullable)  aInvitees
message: (NSString *_Nullable)  aMessage
setting: (AgoraChatGroupOptions *_Nullable)  aSetting
error: (AgoraChatError **_Nullable)  pError 
required

Creates a group.

This is a synchronous method and blocks the current thread.

Parameters
aSubjectThe subject of the group.
aDescriptionThe description of the group.
aInviteesThe members of the group. Do not include the creator.
aMessageThe invitation message.
aSettingThe group options.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ declineGroupInvitation:inviter:reason:completion:

- (void) declineGroupInvitation: (NSString *_Nonnull)  aGroupId
inviter: (NSString *_Nonnull)  aInviter
reason: (NSString *_Nullable)  aReason
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Declines a group invitation.

This is an asynchronous method.

Parameters
aGroupIdThe group ID.
aInviterThe user who send the invitation.
aReasonThe reason of declining.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ declineInvitationFromGroup:inviter:reason:

- (AgoraChatError *) declineInvitationFromGroup: (NSString *_Nonnull)  aGroupId
inviter: (NSString *_Nonnull)  aUsername
reason: (NSString *_Nullable)  aReason 
required

Declines a group invitation.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
aUsernameThe user who initiates the invitation.
aReasonThe reason for declining.
Returns
The error information if the method fails: Error.

◆ declineJoinApplication:applicant:reason:

- (AgoraChatError *) declineJoinApplication: (NSString *_Nonnull)  aGroupId
applicant: (NSString *_Nonnull)  aUsername
reason: (NSString *_Nullable)  aReason 
required

Declines a group request.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
aUsernameThe user who sends the request for join the group.
aReasonThe reason of declining.
Returns
Error

◆ declineJoinGroupRequest:sender:reason:completion:

- (void) declineJoinGroupRequest: (NSString *_Nonnull)  aGroupId
sender: (NSString *_Nonnull)  aUsername
reason: (NSString *_Nullable)  aReason
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Declines a group request.

Only the group owner can call this method.

This is an asynchronous method.

Parameters
aGroupIdThe group ID.
aUsernameThe user who sends the request for join the group.
aReasonThe reason for declining.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ destroyGroup:

- (AgoraChatError *) destroyGroup: (NSString *_Nonnull)  aGroupId
required

Destroys a group.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
Returns
The error information if the method fails: Error. The SDK wil return nil if the method succeed.

◆ destroyGroup:finishCompletion:

- (void) destroyGroup: (NSString *_Nonnull)  aGroupId
finishCompletion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Destroys a group.

Only the group owner can call this method.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ downloadGroupSharedFileWithId:filePath:sharedFileId:progress:completion:

- (void) downloadGroupSharedFileWithId: (NSString *_Nonnull)  aGroupId
filePath: (NSString *_Nonnull)  aFilePath
sharedFileId: (NSString *_Nonnull)  aSharedFileId
progress: (void(^)(int progress))  aProgressBlock
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Downloads the share file of group.

Parameters
aGroupIdThe group ID.
aFilePathThe path of file.
aSharedFileIdThe shared file ID.
aProgressBlockThe block of attachment upload progress
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ fetchGroupMuteListFromServerWithId:pageNumber:pageSize:completion:

- (void) fetchGroupMuteListFromServerWithId: (NSString *_Nonnull)  aGroupId
pageNumber: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
completion: (void(^)(NSDictionary< NSString *, NSNumber * > *_Nullable aDict, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets the mutelist of the group from the server.

Only the group owner or admin can call this method.

Parameters
aGroupIdThe group ID.
aPageNumThe page number.
aPageSizeThe page size.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ fetchMemberAttribute:userId:completion:

- (void) fetchMemberAttribute: (NSString *_Nonnull)  groupId
userId: (NSString *_Nonnull)  userId
completion: (void(^)(NSDictionary< NSString *, NSString * > *_Nullable, AgoraChatError *_Nullable))  completionBlock 
required

Gets all custom attributes of a group member.

Parameters
groupIdThe group ID.
userIdThe user ID of the group member whose all custom attributes are retrieved.
completionThe completion block, which contains the map of all retrieved attributes and the error message (AgoraChatError) if the method call fails:
  • If the method call succeeds, the SDK returns the map of retrieved custom attributes in key-value pairs. In this case, AgoraChatError is empty.
  • If the method call fails, the SDK returns the reason for the failure (AgoraChatError). In this case, the map of custom attributes is empty.
  • If both the map of custom attributes and AgoraChatError are empty, no custom attribute is set for the group member.

◆ fetchMembersAttributes:userIds:keys:completion:

- (void) fetchMembersAttributes: (NSString *_Nonnull)  groupId
userIds: (NSArray< __kindof NSString * > *_Nonnull)  userIds
keys: (NSArray< __kindof NSString * > *_Nonnull)  keys
completion: (void(^)(NSDictionary< NSString *, NSDictionary< NSString *, NSString * > * > *_Nullable attributes, AgoraChatError *_Nullable error))  completionBlock 
required

Gets custom attributes of multiple group members by attribute key.

Parameters
groupIdThe group ID.
userIdsThe array of user IDs of group members whose custom attributes are retrieved.(limitation is ten.More than callback error. )
keysThe array of keys of custom attributes to be retrieved.
completionThe completion block, which contains the map of retrieved attributes and the error message (AgoraChatError) if the method call fails.
  • If the method call succeeds, the SDK returns the map of retrieved custom attributes in key-value pairs. In this case, AgoraChatError is empty. If no custom attribute is set for a group members, the map of custom attribute is empty for this member.
  • If the method call fails, the SDK returns the reason for the failure (AgoraChatError). In this case, the map of custom attributes is empty for the group members.
  • If both the map of custom attributes and AgoraChatError are empty, no custom attribute is set for the group members.

◆ getGroupAnnouncementWithId:completion:

- (void) getGroupAnnouncementWithId: (NSString *_Nonnull)  aGroupId
completion: (void(^)(NSString *aAnnouncement, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets the announcement of group from the server.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getGroupAnnouncementWithId:error:

- (NSString *_Nullable) getGroupAnnouncementWithId: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Gets the announcement of group from the server.

Parameters
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group Announcement. The SDK will return nil if fails.

◆ getGroupBlacklistFromServerWithId:pageNumber:pageSize:completion:

- (void) getGroupBlacklistFromServerWithId: (NSString *_Nonnull)  aGroupId
pageNumber: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
completion: (void(^)(NSArray< NSString * > *_Nullable aList, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets the group's blocklist.

Only the group owner or admin can call this method.

Parameters
aGroupIdThe group ID.
aPageNumThe page number.
aPageSizeThe page size.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getGroupBlacklistFromServerWithId:pageNumber:pageSize:error:

- (NSArray< NSString * > *_Nullable) getGroupBlacklistFromServerWithId: (NSString *_Nonnull)  aGroupId
pageNumber: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
error: (AgoraChatError **_Nullable)  pError 
required

Gets the blocklist of group from the server.

Only the group owner or admin can call this method.

Parameters
aGroupIdThe group ID.
aPageNumThe page number.
aPageSizeThe page size.
pErrorThe error information if the method fails: Error.
Returns
The blockList of the group.

◆ getGroupFileListWithId:pageNumber:pageSize:completion:

- (void) getGroupFileListWithId: (NSString *_Nonnull)  aGroupId
pageNumber: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
completion: (void(^)(NSArray< AgoraChatGroupSharedFile * > *_Nullable aList, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets the share files of group from the server.

This is an asynchronous method.

Parameters
aGroupIdThe group ID.
aPageNumThe page number.
aPageSizeThe page size.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getGroupFileListWithId:pageNumber:pageSize:error:

- (NSArray< AgoraChatGroupSharedFile * > *_Nullable) getGroupFileListWithId: (NSString *_Nonnull)  aGroupId
pageNumber: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
error: (AgoraChatError **_Nullable)  pError 
required

Gets the share files of group from the server.

Parameters
aGroupIdThe group ID.
aPageNumThe page number.
aPageSizeThe page size.
pErrorThe error information if the method fails: Error.
Returns
The list of share files of group.

◆ getGroupMemberListFromServerWithId:cursor:pageSize:completion:

- (void) getGroupMemberListFromServerWithId: (NSString *_Nonnull)  aGroupId
cursor: (NSString *_Nullable)  aCursor
pageSize: (NSInteger)  aPageSize
completion: (void(^)(AgoraChatCursorResult< NSString * > *aResult, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets the list of group members from the server.

Parameters
aGroupIdThe group ID.
aCursorThe cursor when joins the group. Sets the parameter as nil for the first time.
aPageSizeThe page size.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getGroupMemberListFromServerWithId:cursor:pageSize:error:

- (AgoraChatCursorResult< NSString * > *) getGroupMemberListFromServerWithId: (NSString *_Nonnull)  aGroupId
cursor: (NSString *_Nullable)  aCursor
pageSize: (NSInteger)  aPageSize
error: (AgoraChatError **_Nullable)  pError 
required

Gets the list of group members from the server.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
aCursorThe cursor when joins the group. Sets the parameter as nil for the first time.
aPageSizeThe expect entry number of the list.
pErrorThe error information if the method fails: Error.
Returns
The list and cursor.

◆ getGroupMuteListFromServerWithId:pageNumber:pageSize:completion:

- (void) getGroupMuteListFromServerWithId: (NSString *_Nonnull)  aGroupId
pageNumber: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
completion: (void(^)(NSArray< NSString * > *_Nullable aList, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets the mutelist of the group from the server.

Only the group owner or admin can call this method.

Parameters
aGroupIdThe group ID.
aPageNumThe page number.
aPageSizeThe page size.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getGroupMuteListFromServerWithId:pageNumber:pageSize:error:

- (NSArray< NSString * > *_Nullable) getGroupMuteListFromServerWithId: (NSString *_Nonnull)  aGroupId
pageNumber: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
error: (AgoraChatError **_Nullable)  pError 
required

Gets the mutelist of the group from the server.

Only the group owner or admin can call this method.

Parameters
aGroupIdThe group ID.
aPageNumThe page number.
aPageSizeThe page size.
pErrorThe error information if the method fails: Error.
Returns
The mutelist of the group.

◆ getGroupSpecificationFromServerWithId:completion:

- (void) getGroupSpecificationFromServerWithId: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Fetches the group specification, including: ID, name, description, setting, owner, admins.

This is an asynchronous method.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getGroupSpecificationFromServerWithId:error:

- (AgoraChatGroup *_Nullable) getGroupSpecificationFromServerWithId: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Fetches the group information,including the group ID, name, description,setting, owner and admins.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ getGroupSpecificationFromServerWithId:fetchMembers:completion:

- (void) getGroupSpecificationFromServerWithId: (NSString *_Nonnull)  aGroupId
fetchMembers: (BOOL)  fetchMembers
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Fetches the group specification, including: ID, name, description, setting, owner, admins.

Parameters
aGroupIdThe group ID.
fetchMembersWhether to fetch the group members. The default action fetches at most 200 members.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getGroupSpecificationFromServerWithId:fetchMembers:error:

- (AgoraChatGroup *_Nullable) getGroupSpecificationFromServerWithId: (NSString *_Nonnull)  aGroupId
fetchMembers: (BOOL)  fetchMembers
error: (AgoraChatError **_Nullable)  pError 
required

Fetches the group specification, including the group ID, name, description, setting, owner, admins.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
fetchMembersWhether to fetch the group members. The default action fetches at most 200 members.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ getGroupsWithoutPushNotification:

- (NSArray *) getGroupsWithoutPushNotification: (3_3_2) 
(3_8_3) 
("Use -IAgoraChatPushManager::noPushGroups")  EM_DEPRECATED_IOS 
required

Gets the list of groups which have disabled Apple Push Notification Service.

Parameters
pErrorThe error information if the method fails: Error.
Returns
The group ID list.

◆ getGroupWhiteListFromServerWithId:completion:

- (void) getGroupWhiteListFromServerWithId: (NSString *_Nonnull)  aGroupId
completion: (void(^)(NSArray< NSString * > *_Nullable aList, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets the allowlist of group from the server.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getGroupWhiteListFromServerWithId:error:

- (NSArray *) getGroupWhiteListFromServerWithId: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Gets the allowlist of group from the server.

Parameters
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The allowList of the group.

◆ getJoinedGroups

- (NSArray< AgoraChatGroup * > *_Nullable) getJoinedGroups
required

Gets the local information of all groups created and joined by the current user.

Returns
The group list.

◆ getJoinedGroupsCountFromServerWithCompletion:

- (void) getJoinedGroupsCountFromServerWithCompletion: (void(^)(NSInteger groupCount, AgoraChatError *_Nullable aError))  aCompletionBlock
required

Gets groups count of the current user joined from the server.

This is an asynchronous method.

Parameters
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getJoinedGroupsFromServerWithPage:pageSize:completion:

- (void) getJoinedGroupsFromServerWithPage: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
completion: ("Use -getJoinedGroupsFromServerWithPage:pageSize:needMemberCount:needRole:error:completion: instead")  __deprecated_msg 
required

Gets the pagesize number group you joined from the server.

Deprecated, please use getJoinedGroupsFromServerWithPage:pageSize:needMemberCount:needRole:error:completion: instead.

This is an asynchronous method.

Parameters
aPageNumThe cursor when joins the group. Sets the parameter as nil for the first time.
aPageSizeThe number of results expected to be returned, if <0 then all results will be returned at once.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getJoinedGroupsFromServerWithPage:pageSize:error:

- (NSArray< AgoraChatGroup * > *_Nullable) getJoinedGroupsFromServerWithPage: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
error: ("Use -getJoinedGroupsFromServerWithPage:pageSize:needMemberCount:needRole:error:completion: instead")  __deprecated_msg 
required

Gets pagesize number group you joined from the server.

This is a synchronous method and blocks the current thread.

Parameters
aPageNumGets the cursor to join the group. Sets the parameter as nil for the first time.
aPageSizeThe number of results expected to be returned. If <0 then all results will be returned at once
pErrorThe error information if the method fails: Error.
Returns
The Group list.

◆ getJoinedGroupsFromServerWithPage:pageSize:needMemberCount:needRole:completion:

- (void) getJoinedGroupsFromServerWithPage: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
needMemberCount: (BOOL)  aNeedMemberCount
needRole: (BOOL)  aNeedRole
completion: (void(^)(NSArray< AgoraChatGroup * > *_Nullable aList, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Uses the pagination to get the number group that you joined.

This method gets data from the server.

This is an asynchronous method.

Parameters
aPageNumThe current page number, starting from 0. After this parameter is set, the SDK gets data from the specified position in the reverse chronological order of when the user joined groups. At the first method call, if you set this parameter as 0, the SDK gets data starting from the latest group that the user joined.
aPageSizeThe number of groups that you expect to get on each page. The value range is [1,20].
aNeedMemberCountneed member count Whether the number of group members is required.
  • YES:Yes.
  • NO:No.
aNeedRoleneed role Whether the role of the current user in the group is required.
  • YES:Yes.
  • NO:No.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getPublicGroupsFromServerWithCursor:pageSize:completion:

- (void) getPublicGroupsFromServerWithCursor: (NSString *_Nullable)  aCursor
pageSize: (NSInteger)  aPageSize
completion: (void(^)(AgoraChatCursorResult< AgoraChatGroup * > *_Nullable aResult, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets public groups with the specified range from the server.

This is an asynchronous method.

Parameters
aCursorGets the cursor to join the group. Sets the parameter as nil for the first time.
aPageSizeThe number of results expected to be returned. If the number is less than 0 then all results will be returned at once.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ getPublicGroupsFromServerWithCursor:pageSize:error:

- (AgoraChatCursorResult< AgoraChatGroup * > *_Nullable) getPublicGroupsFromServerWithCursor: (NSString *_Nullable)  aCursor
pageSize: (NSInteger)  aPageSize
error: (AgoraChatError **_Nullable)  pError 
required

Gets the public groups with the specified range from the server.

This is a synchronous method and blocks the current thread.

Parameters
aCursorThe cursor to join the group. Sets the parameter as nil for the first time.
aPageSizeThe number of results expected to be returned. If the number is less than 0 then all results will be returned at once.
pErrorThe error information if the method fails: Error.
Returns
The result.

◆ ignoreGroupPush:ignore:

- (AgoraChatError *) ignoreGroupPush: (NSString *)  aGroupId
ignore: (3_3_2) 
(3_8_3) 
("Use -IAgoraChatPushManager::updatePushServiceForGroups:disablePush:")  EM_DEPRECATED_IOS 
required

Blocks/unblocks group message‘s push notification.

This is a synchronous method and blocks the current thread.

Deprecated, please use IAgoraChatPushManager::updatePushServiceForGroups:disablePush: instead.

Parameters
aGroupIdThe group ID.
aIsIgnoreWhether to show or ignore the push notification.
Returns
The error information if the method fails: Error.

◆ ignoreGroupsPush:ignore:

- (AgoraChatError *) ignoreGroupsPush: (NSArray *)  aGroupIDs
ignore: (3_3_2) 
(3_8_3) 
("Use -IAgoraChatPushManager::updatePushServiceForGroups:disablePush:")  EM_DEPRECATED_IOS 
required

Blocks/unblocks the group message‘s push notification.

Deprecated, please use IAgoraChatPushManager::updatePushServiceForGroups:disablePush: instead.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIDsThe group ID list.
aIsIgnoreWhether to show or ignore the push notification.
Returns
The error information if the method fails: Error.

◆ isMemberInMuteListFromServerWithGroupId:completion:

- (void) isMemberInMuteListFromServerWithGroupId: (NSString *_Nonnull)  aGroupId
completion: (void(^)(BOOL inMuteList, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Checks whether the current user is on the mute list of a group.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ isMemberInWhiteListFromServerWithGroupId:completion:

- (void) isMemberInWhiteListFromServerWithGroupId: (NSString *_Nonnull)  aGroupId
completion: (void(^)(BOOL inWhiteList, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets whether the member is on the allowlist.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ isMemberInWhiteListFromServerWithGroupId:error:

- (BOOL) isMemberInWhiteListFromServerWithGroupId: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Gets whether the member is on the allowlist.

Parameters
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
BOOL. YES: in whiteList. NO: not in whiteList.

◆ joinPublicGroup:completion:

- (void) joinPublicGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Joins a public group. The group style should be AgoraChatGroupStylePublicOpenJoin.

Parameters
aGroupIdThe public group ID。
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ joinPublicGroup:error:

- (AgoraChatGroup *_Nullable) joinPublicGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Joins a public group. The group style should be AgoraChatGroupStylePublicOpenJoin.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe public group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ leaveGroup:completion:

- (void) leaveGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Leaves a group. The owner can't leave the group, can only destroy the group.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ leaveGroup:error:

- (void) leaveGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Leaves a group. The owner can't leave the group, can only destroy the group.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.

◆ muteAllMembersFromGroup:completion:

- (void) muteAllMembersFromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

mute all members.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ muteAllMembersFromGroup:error:

- (AgoraChatGroup *_Nullable) muteAllMembersFromGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Mutes all members.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ muteMembers:muteMilliseconds:fromGroup:completion:

- (void) muteMembers: (NSArray< NSString * > *_Nonnull)  aMuteMembers
muteMilliseconds: (NSInteger)  aMuteMilliseconds
fromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Mutes group members.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aMuteMembersThe list of mute, type is <NSString>
aMuteMillisecondsMuted time duration in millisecond
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ muteMembers:muteMilliseconds:fromGroup:error:

- (AgoraChatGroup *_Nullable) muteMembers: (NSArray< NSString * > *_Nonnull)  aMuteMembers
muteMilliseconds: (NSInteger)  aMuteMilliseconds
fromGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Mutes group members.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aMuteMembersThe list of members to be muted.
aMuteMillisecondsThe muted time duration in millisecond.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ removeAdmin:fromGroup:completion:

- (void) removeAdmin: (NSString *_Nonnull)  aAdmin
fromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Removes the group admin.

Only the group owner can call this method.

This is an asynchronous method.

Parameters
aAdminThe admin to be removed.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ removeAdmin:fromGroup:error:

- (AgoraChatGroup *_Nullable) removeAdmin: (NSString *_Nonnull)  aAdmin
fromGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Removes a group admin.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aAdminThe admin to be removed.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ removeDelegate:

- (void) removeDelegate: (id _Nonnull)  aDelegate
required

Removes delegate.

Parameters
aDelegateThe delegate to be removed.

◆ removeGroupSharedFileWithId:sharedFileId:completion:

- (void) removeGroupSharedFileWithId: (NSString *_Nonnull)  aGroupId
sharedFileId: (NSString *_Nonnull)  aSharedFileId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Removes the share file of group.

Parameters
aGroupIdThe group ID.
aSharedFileIdThe share file ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ removeGroupSharedFileWithId:sharedFileId:error:

- (AgoraChatGroup *_Nullable) removeGroupSharedFileWithId: (NSString *_Nonnull)  aGroupId
sharedFileId: (NSString *_Nonnull)  aSharedFileId
error: (AgoraChatError **_Nullable)  pError 
required

Removes the share file of the group.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
aSharedFileIdThe share file ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ removeMembers:fromGroup:completion:

- (void) removeMembers: (NSArray< NSString * > *_Nonnull)  aUsers
fromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Removes members from the group.

Only the group owner can call this method.

Parameters
aUsersThe members to be removed from the group.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ removeOccupants:fromGroup:error:

- (AgoraChatGroup *_Nullable) removeOccupants: (NSArray< NSString * > *_Nonnull)  aOccupants
fromGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Removes members from the group.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aOccupantsThe users to be removed from the group.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ removeWhiteListMembers:fromGroup:completion:

- (void) removeWhiteListMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Removes members from the allowlist.

This is an asynchronous method.

Only the chatroom owner or admin can call this method.

Parameters
aMembersThe members to be removed from the allowlist.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ removeWhiteListMembers:fromGroup:error:

- (AgoraChatGroup *_Nullable) removeWhiteListMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Removes members from the allowlist.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aMembersThe members to be removed from the allowlist.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ requestToJoinPublicGroup:message:completion:

- (void) requestToJoinPublicGroup: (NSString *_Nonnull)  aGroupId
message: (NSString *_Nullable)  aMessage
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Requests to join a public group. The group style should be AgoraChatGroupStylePublicJoinNeedApproval.

Parameters
aGroupIdThe public group ID.
aMessageThe information in the request.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ searchPublicGroupWithId:completion:

- (void) searchPublicGroupWithId: (NSString *_Nonnull)  aGroundId
completion: (void(^)(AgoraChatGroup *aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Searches public group with group ID.

Parameters
aGroundIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ searchPublicGroupWithId:error:

- (AgoraChatGroup *_Nullable) searchPublicGroupWithId: (NSString *_Nonnull)  aGroundId
error: (AgoraChatError **_Nullable)  pError 
required

Searches a public group with the group ID.

This is a synchronous method and blocks the current thread.

Parameters
aGroundIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The groups searched.

◆ setMemberAttribute:userId:attributes:completion:

- (void) setMemberAttribute: (NSString *_Nonnull)  groupId
userId: (NSString *_Nonnull)  userId
attributes: (NSDictionary< NSString *, NSString * > *_Nonnull)  attributes
completion: (void(^)(AgoraChatError *_Nullable error))  completionBlock 
required

Sets custom attributes of a group member.

Parameters
groupIdThe group ID.
userIdThe user ID of the group member for whom the custom attributes are set.
attributesThe map of custom attributes in key-value format. In a key-value pair, if the value is set to an empty string, the custom attribute will be deleted.
completionThe completion block, which contains the error message if the method call fails.

◆ unblockGroup:completion:

- (void) unblockGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Unblocks group messages.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ unblockGroup:error:

- (AgoraChatGroup *_Nullable) unblockGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Unblocks group messages.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ unblockMembers:fromGroup:completion:

- (void) unblockMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Removes users out of the blocklist of the group.

Only the group owner can call this method.

Parameters
aMembersThe users to be removed from the blockList.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ unblockOccupants:forGroup:error:

- (AgoraChatGroup *_Nullable) unblockOccupants: (NSArray< NSString * > *_Nonnull)  aOccupants
forGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Removes users from the blocklist of the group.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aOccupantsThe users to be removed from the blockList.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ unmuteAllMembersFromGroup:completion:

- (void) unmuteAllMembersFromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Unmutes all members.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ unmuteAllMembersFromGroup:error:

- (AgoraChatGroup *_Nullable) unmuteAllMembersFromGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Unmutes all members.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ unmuteMembers:fromGroup:completion:

- (void) unmuteMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Unmutes group members.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aMembersThe list of members to be unmuted.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ unmuteMembers:fromGroup:error:

- (AgoraChatGroup *_Nullable) unmuteMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromGroup: (NSString *_Nonnull)  aGroupId
error: (AgoraChatError **_Nullable)  pError 
required

Unmutes group members.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aMembersThe list of members to be unmuted.
aGroupIdThe group ID.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ updateDescription:forGroup:completion:

- (void) updateDescription: (NSString *_Nullable)  aDescription
forGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Changes the group description.

Only the group owner can call this method.

Parameters
aDescriptionThe new group‘s description.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ updateGroupAnnouncementWithId:announcement:completion:

- (void) updateGroupAnnouncementWithId: (NSString *_Nonnull)  aGroupId
announcement: (NSString *_Nullable)  aAnnouncement
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Updates the announcement of group.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aGroupIdThe group ID.
aAnnouncementThe announcement of the group.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ updateGroupAnnouncementWithId:announcement:error:

- (AgoraChatGroup *_Nullable) updateGroupAnnouncementWithId: (NSString *_Nonnull)  aGroupId
announcement: (NSString *_Nullable)  aAnnouncement
error: (AgoraChatError **_Nullable)  pError 
required

Updates the announcement of group.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
aAnnouncementThe announcement of the group.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ updateGroupExtWithId:ext:completion:

- (void) updateGroupExtWithId: (NSString *_Nonnull)  aGroupId
ext: (NSString *_Nullable)  aExt
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Updates the extended information of the group.

Only the group owner can call this method.

Parameters
aGroupIdThe group ID.
aExtThe extended information of the group.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ updateGroupExtWithId:ext:error:

- (AgoraChatGroup *_Nullable) updateGroupExtWithId: (NSString *_Nonnull)  aGroupId
ext: (NSString *_Nullable)  aExt
error: (AgoraChatError **_Nullable)  pError 
required

Updates the extended of the group.

Only the owner of the group can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
aExtThe extended information of the group.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ updateGroupOwner:newOwner:completion:

- (void) updateGroupOwner: (NSString *_Nonnull)  aGroupId
newOwner: (NSString *_Nonnull)  aNewOwner
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Changes the owner of the group.

Only the group owner can call this method.

Parameters
aGroupIdThe group ID.
aNewOwnerThe new group owner.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ updateGroupOwner:newOwner:error:

- (AgoraChatGroup *_Nullable) updateGroupOwner: (NSString *_Nonnull)  aGroupId
newOwner: (NSString *_Nonnull)  aNewOwner
error: (AgoraChatError **_Nullable)  pError 
required

Changes the owner of the group.

Only the group owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aGroupIdThe group ID.
aNewOwnerThe new group owner.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

◆ updateGroupSubject:forGroup:completion:

- (void) updateGroupSubject: (NSString *_Nullable)  aSubject
forGroup: (NSString *_Nonnull)  aGroupId
completion: (void(^)(AgoraChatGroup *_Nullable aGroup, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Changes the group subject.

Only the group owner can call this method.

Parameters
aSubjectThe new subject of the group.
aGroupIdThe group ID.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ updatePushServiceForGroup:isPushEnabled:completion:

- (void) updatePushServiceForGroup: (NSString *)  aGroupId
isPushEnabled: (BOOL)  aIsEnable
completion: (3_3_2) 
(3_8_3) 
("Use -IAgoraChatPushManager::updatePushServiceForGroups:disablePush:completion:")  EM_DEPRECATED_IOS 
required

Blocks/unblocks the group message‘s push notification.

Deprecated, please use IAgoraChatPushManager::updatePushServiceForGroups:disablePush:completion: instead.

Parameters
aGroupIdThe group ID.
aIsEnableWhether to block or unblock the push notification.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ updatePushServiceForGroups:isPushEnabled:completion:

- (void) updatePushServiceForGroups: (NSArray *)  aGroupIDs
isPushEnabled: (BOOL)  aIsEnable
completion: (3_3_2) 
(3_8_3) 
("Use -IAgoraChatPushManager::updatePushServiceForGroups:disablePush:completion:")  EM_DEPRECATED_IOS 
required

Blocks/unblocks the group message‘s push notification.

Deprecated, please use IAgoraChatPushManager::updatePushServiceForGroups:disablePush:completion: instead.

Parameters
aGroupIDsThe group ID list.
aIsEnableWhether to enable group messages push.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ uploadGroupSharedFileWithId:filePath:progress:completion:

- (void) uploadGroupSharedFileWithId: (NSString *_Nonnull)  aGroupId
filePath: (NSString *_Nonnull)  aFilePath
progress: (void(^)(int progress))  aProgressBlock
completion: (void(^)(AgoraChatGroupSharedFile *_Nullable aSharedFile, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Uploads the share file of group.

Parameters
aGroupIdThe group ID.
aFilePathThe path of file.
pErrorThe error information if the method fails: Error.
Returns
The group instance.

The documentation for this protocol was generated from the following file: