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

#import <IAgoraChatroomManager.h>

Inheritance diagram for <IAgoraChatroomManager>:

Instance Methods

(void) - addDelegate:delegateQueue:
 
(void) - removeDelegate:
 
(AgoraChatPageResult< AgoraChatroom * > *_Nullable) - getChatroomsFromServerWithPage:pageSize:error:
 
(void) - getChatroomsFromServerWithPage:pageSize:completion:
 
(AgoraChatroom *_Nullable) - createChatroomWithSubject:description:invitees:message:maxMembersCount:error:
 
(void) - createChatroomWithSubject:description:invitees:message:maxMembersCount:completion:
 
(AgoraChatroom *) - joinChatroom:error:
 
(void) - joinChatroom:completion:
 
(void) - joinChatroom:ext:leaveOtherRooms:completion:
 
(void) - leaveChatroom:error:
 
(void) - leaveChatroom:completion:
 
(AgoraChatError *_Nullable) - destroyChatroom:
 
(void) - destroyChatroom:completion:
 
(AgoraChatroom *_Nullable) - getChatroomSpecificationFromServerWithId:error:
 
(void) - getChatroomSpecificationFromServerWithId:completion:
 
(void) - getChatroomSpecificationFromServerWithId:fetchMembers:completion:
 
(AgoraChatCursorResult< NSString * > *_Nullable) - getChatroomMemberListFromServerWithId:cursor:pageSize:error:
 
(void) - getChatroomMemberListFromServerWithId:cursor:pageSize:completion:
 
(NSArray< NSString * > *_Nullable) - getChatroomBlacklistFromServerWithId:pageNumber:pageSize:error:
 
(void) - getChatroomBlacklistFromServerWithId:pageNumber:pageSize:completion:
 
(NSArray< NSString * > *_Nullable) - getChatroomMuteListFromServerWithId:pageNumber:pageSize:error:
 
(void) - getChatroomMuteListFromServerWithId:pageNumber:pageSize:completion:
 
(NSArray< NSString * > *_Nullable) - getChatroomWhiteListFromServerWithId:error:
 
(void) - getChatroomWhiteListFromServerWithId:completion:
 
(BOOL) - isMemberInWhiteListFromServerWithChatroomId:error:
 
(void) - isMemberInWhiteListFromServerWithChatroomId:completion:
 
(void) - isMemberInMuteListFromServerWithChatroomId:completion:
 
(NSString *_Nullable) - getChatroomAnnouncementWithId:error:
 
(void) - getChatroomAnnouncementWithId:completion:
 
(AgoraChatroom *) - updateSubject:forChatroom:error:
 
(void) - updateSubject:forChatroom:completion:
 
(AgoraChatroom *_Nullable) - updateDescription:forChatroom:error:
 
(void) - updateDescription:forChatroom:completion:
 
(AgoraChatroom *_Nullable) - removeMembers:fromChatroom:error:
 
(void) - removeMembers:fromChatroom:completion:
 
(AgoraChatroom *_Nullable) - blockMembers:fromChatroom:error:
 
(void) - blockMembers:fromChatroom:completion:
 
(AgoraChatroom *_Nullable) - unblockMembers:fromChatroom:error:
 
(void) - unblockMembers:fromChatroom:completion:
 
(AgoraChatroom *_Nullable) - updateChatroomOwner:newOwner:error:
 
(void) - updateChatroomOwner:newOwner:completion:
 
(AgoraChatroom *_Nullable) - addAdmin:toChatroom:error:
 
(void) - addAdmin:toChatroom:completion:
 
(AgoraChatroom *_Nullable) - removeAdmin:fromChatroom:error:
 
(void) - removeAdmin:fromChatroom:completion:
 
(AgoraChatroom *_Nullable) - muteMembers:muteMilliseconds:fromChatroom:error:
 
(void) - muteMembers:muteMilliseconds:fromChatroom:completion:
 
(AgoraChatroom *_Nullable) - unmuteMembers:fromChatroom:error:
 
(void) - unmuteMembers:fromChatroom:completion:
 
(AgoraChatroom *_Nullable) - muteAllMembersFromChatroom:error:
 
(void) - muteAllMembersFromChatroom:completion:
 
(AgoraChatroom *_Nullable) - unmuteAllMembersFromChatroom:error:
 
(void) - unmuteAllMembersFromChatroom:completion:
 
(AgoraChatroom *_Nullable) - addWhiteListMembers:fromChatroom:error:
 
(void) - addWhiteListMembers:fromChatroom:completion:
 
(AgoraChatroom *_Nullable) - removeWhiteListMembers:fromChatroom:error:
 
(void) - removeWhiteListMembers:fromChatroom:completion:
 
(AgoraChatroom *_Nullable) - updateChatroomAnnouncementWithId:announcement:error:
 
(void) - updateChatroomAnnouncementWithId:announcement:completion:
 
(void) - setChatroomAttributes:attributes:autoDelete:completionBlock:
 
(void) - setChatroomAttribute:key:value:autoDelete:completionBlock:
 
(void) - setChatroomAttributesForced:attributes:autoDelete:completionBlock:
 
(void) - setChatroomAttributeForced:key:value:autoDelete:completionBlock:
 
(void) - removeChatroomAttributes:attributes:completionBlock:
 
(void) - removeChatroomAttribute:key:completionBlock:
 
(void) - removeChatroomAttributesForced:attributes:completionBlock:
 
(void) - removeChatroomAttributeForced:key:completionBlock:
 
(void) - fetchChatroomAttributes:keys:completion:
 
(void) - fetchChatroomAllAttributes:completion:
 
(AgoraChatroom *) - fetchChatroomInfo:includeMembersList:error:
 
(void) - getChatroomSpecificationFromServerByID:includeMembersList:completion:
 
(void) - addDelegate:
 
(NSArray *) - getAllChatroomsFromServerWithError:
 
(void) - getAllChatroomsFromServerWithCompletion:
 
(void) - asyncGetAllChatroomsFromServer:failure:
 
(void) - asyncJoinChatroom:success:failure:
 
(void) - asyncLeaveChatroom:success:failure:
 
(void) - asyncFetchChatroomInfo:includeMembersList:success:failure:
 

Detailed Description

A class that manages the chatrooms.

Method Documentation

◆ addAdmin:toChatroom:completion:

- (void) addAdmin: (NSString *_Nonnull)  aAdmin
toChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroomp, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Adds a chatroom admin.

Only the chatroom owner can call this method.

This is an asynchronous method.

Parameters
aAdminThe new admin.
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ addAdmin:toChatroom:error:

- (AgoraChatroom *_Nullable) addAdmin: (NSString *_Nonnull)  aAdmin
toChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Adds a chatroom admin.

Only the chatroom owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aAdminThe new admin.
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ addDelegate:

- (void) addDelegate: (3_1_0) 
(3_2_2) 
("Use -IAgoraChatroomManager addDelegate:delegateQueue: instead")  EM_DEPRECATED_IOS 
required

Adds delegate.

Deprecated, please use addDelegate:delegateQueue: instead.

Parameters
aDelegateThe delegate you want to add.

◆ addDelegate:delegateQueue:

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

Adds the SDK delegate.

Parameters
aDelegateThe delegate that you want to add: ChatroomManagerDelegate.
aQueue(Optional) The queue of calling the delegate methods. To run the app on the main thread, set this parameter as nil.

◆ addWhiteListMembers:fromChatroom:completion:

- (void) addWhiteListMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Adds members to the allowlist.

Only the chatroom owner and admin can call this method.

This is an asynchronous method.

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

◆ addWhiteListMembers:fromChatroom:error:

- (AgoraChatroom *_Nullable) addWhiteListMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Adds users to the allowlist.

Only the chatroom owner and admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aMembersThe members to be added to the allowlist.
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ asyncFetchChatroomInfo:includeMembersList:success:failure:

- (void) asyncFetchChatroomInfo: (NSString *)  aChatroomId
includeMembersList: (BOOL)  aIncludeMembersList
success: (void(^)(AgoraChatroom *aChatroom))  aSuccessBlock
failure: ("Use -getChatroomSpecificationFromServerByID:includeMembersList:completion: instead")  __deprecated_msg 
required

Fetches chatroom's specification.

Deprecated, please use getChatroomSpecificationFromServerByID:includeMembersList:completion: instead.

Parameters
aChatroomIdThe chatroom ID.
aIncludeMembersListWhether to get member list.
aSuccessBlockThe callback block of success.
aFailureBlockThe callback block of failure, which contains the error message if the method fails.

◆ asyncGetAllChatroomsFromServer:failure:

- (void) asyncGetAllChatroomsFromServer: (void(^)(NSArray *aList))  aSuccessBlock
failure: ("Use -getAllChatroomsFromServerWithCompletion: instead")  __deprecated_msg 
required

Gets all the chatrooms from the server.

Deprecated, please use getAllChatroomsFromServerWithCompletion instead.

Parameters
aSuccessBlockThe callback block of success.
aFailureBlockThe callback block of failure, which contains the error message if the method fails.

◆ asyncJoinChatroom:success:failure:

- (void) asyncJoinChatroom: (NSString *)  aChatroomId
success: (void(^)(AgoraChatroom *aRoom))  aSuccessBlock
failure: ("Use -joinChatroom:completion: instead")  __deprecated_msg 
required

Joins a chatroom.

Deprecated, please use joinChatroom:completion: instead.

Parameters
aChatroomIdThe chatroom ID.
aSuccessBlockThe callback block of success.
aFailureBlockThe callback block of failure, which contains the error message if the method fails.

◆ asyncLeaveChatroom:success:failure:

- (void) asyncLeaveChatroom: (NSString *)  aChatroomId
success: (void(^)(AgoraChatroom *aRoom))  aSuccessBlock
failure: ("Use -leaveChatroom:completion: instead")  __deprecated_msg 
required

Leaves a chatroom.

Deprecated, please use leaveChatroom:completion: instead.

Parameters
aChatroomIdThe chatroom ID.
aSuccessBlockThe callback block of success.
aFailureBlockThe callback block of failure, which contains the error message if the method fails.
Returns
Leaved chatroom

◆ blockMembers:fromChatroom:completion:

- (void) blockMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Adds users to the chatroom's blocklist.

Only the chatroom owner can call this method.

This is an asynchronous method.

Parameters
aMembersThe users to be added to the chatroom.
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ blockMembers:fromChatroom:error:

- (AgoraChatroom *_Nullable) blockMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Adds users to the chatroom's blocklist.

Only the chatroom owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aMembersThe users to be added to the blocklist.
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance.

◆ createChatroomWithSubject:description:invitees:message:maxMembersCount:completion:

- (void) createChatroomWithSubject: (NSString *_Nullable)  aSubject
description: (NSString *_Nullable)  aDescription
invitees: (NSArray< NSString * > *_Nullable)  aInvitees
message: (NSString *_Nullable)  aMessage
maxMembersCount: (NSInteger)  aMaxMembersCount
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Creates a chatroom.

This is an asynchronous method.

Parameters
aSubjectThe subject of the chatroom.
aDescriptionThe description of the chatroom.
aInviteesThe members of the chatroom. Do not include the creator.
aMessageThe invitation message.
aMaxMembersCountThe maximum number of members in the chatroom.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ createChatroomWithSubject:description:invitees:message:maxMembersCount:error:

- (AgoraChatroom *_Nullable) createChatroomWithSubject: (NSString *_Nullable)  aSubject
description: (NSString *_Nullable)  aDescription
invitees: (NSArray< NSString * > *_Nullable)  aInvitees
message: (NSString *_Nullable)  aMessage
maxMembersCount: (NSInteger)  aMaxMembersCount
error: (AgoraChatError **_Nullable)  pError 
required

Creates a chatroom.

This is a synchronous method and blocks the current thread.

Parameters
aSubjectThe subject of the chatroom.
aDescriptionThe description of the chatroom.
aInviteesThe members of the chatroom. Do not include the creator.
aMessageThe invitation message.
aMaxMembersCountThe maximum number of members in the chatroom.
pErrorThe error information if the method fails: Error.
Returns
The create chatroom. See AgoraChatroom.

◆ destroyChatroom:

- (AgoraChatError *_Nullable) destroyChatroom: (NSString *_Nonnull)  aChatroomId
required

Dismisses a chatroom.

Only the owner of a chatroom has the privilege to dismiss it.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
Returns
- nil if the method call succeeds.

◆ destroyChatroom:completion:

- (void) destroyChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Dismisses a chatroom.

Only the owner of a chatroom has the privilege to dismiss it.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ fetchChatroomAllAttributes:completion:

- (void) fetchChatroomAllAttributes: (NSString *_Nonnull)  roomId
completion: (void(^)(AgoraChatError *_Nullable error, NSDictionary< NSString *, NSString * > *_Nullable properties))  completionBlock 
required

Fetch the properties of chatroom form sever. This is an asynchronous method.

Parameters
roomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains keyValues and the error message if the method call fails.

◆ fetchChatroomAttributes:keys:completion:

- (void) fetchChatroomAttributes: (NSString *_Nonnull)  roomId
keys: (NSArray< __kindof NSString * > *_Nullable)  keys
completion: (void(^)(AgoraChatError *_Nullable aError, NSDictionary< NSString *, NSString * > *_Nullable properties))  completionBlock 
required

Fetch the properties of chatroom form sever. This is an asynchronous method.

Parameters
roomIdThe chatroom ID.
keysChat room attribute keys.Empty callback all.
aCompletionBlockThe completion block, which contains keyValues and the error message if the method call fails.

◆ fetchChatroomInfo:includeMembersList:error:

- (AgoraChatroom *) fetchChatroomInfo: (NSString *)  aChatroomId
includeMembersList: (BOOL)  aIncludeMembersList
error: (3_1_0) 
(3_3_0) 
("Use -IAgoraChatroomManager getChatroomSpecificationFromServerWithId:error: instead")  EM_DEPRECATED_IOS 
required

Fetches the chatroom's specification.

Deprecated, please use getChatroomSpecificationFromServerWithId:error: instead.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
aIncludeMembersListWhether to get the member list. If you set the parameter as YES, it will return no more than 200 members.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ getAllChatroomsFromServerWithCompletion:

- (void) getAllChatroomsFromServerWithCompletion: ("Use -getChatroomsFromServerWithPage instead")  __deprecated_msg
required

Gets all the chatrooms from server.

Deprecated, please use getChatroomsFromServerWithPage instead.

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

◆ getAllChatroomsFromServerWithError:

- (NSArray *) getAllChatroomsFromServerWithError: ("Use -getChatroomsFromServerWithPage instead")  __deprecated_msg
required

Gets all the chatrooms from the server.

Deprecated, please use getChatroomsFromServerWithPage instead.

This is a synchronous method and blocks the current thread.

Parameters
pErrorThe error information if the method fails: Error.
Returns
The chat room list.

◆ getChatroomAnnouncementWithId:completion:

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

Gets the announcement of a chatroom from the server.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ getChatroomAnnouncementWithId:error:

- (NSString *_Nullable) getChatroomAnnouncementWithId: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Gets the announcement of a chatroom from the server.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The announcement of chatroom.

◆ getChatroomBlacklistFromServerWithId:pageNumber:pageSize:completion:

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

Gets the chatroom's blocklist.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

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

◆ getChatroomBlacklistFromServerWithId:pageNumber:pageSize:error:

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

Gets the blocklist of chatroom from the server.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
aPageNumThe page number.
aPageSizeThe page size.
pErrorThe error information if the method fails: Error.

◆ getChatroomMemberListFromServerWithId:cursor:pageSize:completion:

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

Gets the list of chatroom members from the server.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCursorThe cursor. Set this parameter as nil when you call this method for the first time.
aPageSizeThe page size.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ getChatroomMemberListFromServerWithId:cursor:pageSize:error:

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

Gets the list of chatroom members from the server.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
aCursorThe cursor. Set this parameter as nil when you call this method for the first time.
aPageSizeThe page size.
pErrorThe error information if the method fails: Error.
Returns
The list of chatroom members and the cursor.

◆ getChatroomMuteListFromServerWithId:pageNumber:pageSize:completion:

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

Gets the list of members who were muted in the chatroom from the server.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

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

◆ getChatroomMuteListFromServerWithId:pageNumber:pageSize:error:

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

Gets the list of members who are muted in the chatroom from the server.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
aPageNumThe page number.
aPageSizeThe page size.
pErrorThe error information if the method fails: Error.

◆ getChatroomsFromServerWithPage:pageSize:completion:

- (void) getChatroomsFromServerWithPage: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
completion: (void(^)(AgoraChatPageResult< AgoraChatroom * > *_Nullable aResult, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Gets the specified number of chat rooms from the server.

This is an asynchronous method.

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

◆ getChatroomsFromServerWithPage:pageSize:error:

- (AgoraChatPageResult< AgoraChatroom * > *_Nullable) getChatroomsFromServerWithPage: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
error: (AgoraChatError **_Nullable)  pError 
required

Gets the specified number of chat rooms from the server.

This is a synchronous method and blocks the current thread.

Parameters
aPageNumThe page number.
aPageSizeThe page size.
pErrorThe error information if the method fails: Error.
Returns
The chat room list. See AgoraChatPageResult.

◆ getChatroomSpecificationFromServerByID:includeMembersList:completion:

- (void) getChatroomSpecificationFromServerByID: (NSString *)  aChatroomId
includeMembersList: (BOOL)  aIncludeMembersList
completion: (3_1_0) 
(3_3_0) 
("Use -IAgoraChatroomManager getChatroomSpecificationFromServerWithId:completion: instead")  EM_DEPRECATED_IOS 
required

Fetches chat room specifications.

Deprecated, please use getChatroomSpecificationFromServerWithId:completion: instead.

Parameters
aChatroomIdThe chatroom ID.
aIncludeMembersListWhether to get the member list. If you set the parameter as YES, it will return 200 members.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ getChatroomSpecificationFromServerWithId:completion:

- (void) getChatroomSpecificationFromServerWithId: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Fetches the chat room specifications.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ getChatroomSpecificationFromServerWithId:error:

- (AgoraChatroom *_Nullable) getChatroomSpecificationFromServerWithId: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError *_Nullable *)  pError 
required

Fetches the specific chatroom.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ getChatroomSpecificationFromServerWithId:fetchMembers:completion:

- (void) getChatroomSpecificationFromServerWithId: (NSString *_Nonnull)  aChatroomId
fetchMembers: (bool)  aFetchMembers
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Fetches the chat room specifications.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aFetchMembersWhether to get the member list. If you set the parameter as YES, it will return no more than 200 members.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ getChatroomWhiteListFromServerWithId:completion:

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

Gets the allowlist of a chatroom from the server.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ getChatroomWhiteListFromServerWithId:error:

- (NSArray< NSString * > *_Nullable) getChatroomWhiteListFromServerWithId: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Gets the allowlist of a chatroom from the server.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.

◆ isMemberInMuteListFromServerWithChatroomId:completion:

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

Checks whether the current user is on the mute list.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ isMemberInWhiteListFromServerWithChatroomId:completion:

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

Checks whether the current user is on the allowlist.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ isMemberInWhiteListFromServerWithChatroomId:error:

- (BOOL) isMemberInWhiteListFromServerWithChatroomId: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Checks whether the current user is on the allowlist.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.

◆ joinChatroom:completion:

- (void) joinChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Joins a chatroom.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ joinChatroom:error:

- (AgoraChatroom *) joinChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Joins a chatroom.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance.

◆ joinChatroom:ext:leaveOtherRooms:completion:

- (void) joinChatroom: (NSString *_Nonnull)  aChatroomId
ext: (NSString *_Nullable)  ext
leaveOtherRooms: (BOOL)  leaveOtherRooms
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Joins the chat room.

This is an asynchronous method.

Parameters
aChatroomIdThe chat room ID.
extThe extension information.
leaveOtherRoomsWhether to leave all the currently joined chat rooms when joining a chat room.
  • YES:Yes. The user joins the chat room, while leaving all other chat rooms.
  • (Default) NO: No. The user joins the chat room, without leaving all other chat rooms.
aCompletionBlockThe completion block, which contains the error message if the method fails.

◆ leaveChatroom:completion:

- (void) leaveChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Leaves a chatroom.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ leaveChatroom:error:

- (void) leaveChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Leaves a chatroom.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.

◆ muteAllMembersFromChatroom:completion:

- (void) muteAllMembersFromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Mutes all members.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ muteAllMembersFromChatroom:error:

- (AgoraChatroom *_Nullable) muteAllMembersFromChatroom: (NSString *_Nonnull)  aChatroomId
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
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ muteMembers:muteMilliseconds:fromChatroom:completion:

- (void) muteMembers: (NSArray< NSString * > *_Nonnull)  aMuteMembers
muteMilliseconds: (NSInteger)  aMuteMilliseconds
fromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Mutes chatroom members.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aMuteMembersThe list of mute.
aMuteMillisecondsMuted time duration in millisecond
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ muteMembers:muteMilliseconds:fromChatroom:error:

- (AgoraChatroom *_Nullable) muteMembers: (NSArray< NSString * > *_Nonnull)  aMuteMembers
muteMilliseconds: (NSInteger)  aMuteMilliseconds
fromChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Mutes chatroom 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 mute.
aMuteMillisecondsMuted time duration in millisecond.
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ removeAdmin:fromChatroom:completion:

- (void) removeAdmin: (NSString *_Nonnull)  aAdmin
fromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Removes a chatroom admin.

Only the chatroom owner and admin can call this method.

This is an asynchronous method.

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

◆ removeAdmin:fromChatroom:error:

- (AgoraChatroom *_Nullable) removeAdmin: (NSString *_Nonnull)  aAdmin
fromChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Removes a chatroom admin.

Only the chatroom owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aAdminThe admin to be removed.
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ removeChatroomAttribute:key:completionBlock:

- (void) removeChatroomAttribute: (NSString *_Nonnull)  roomId
key: (NSString *_Nonnull)  key
completionBlock: (void(^)(AgoraChatError *_Nullable aError))  completionBlock 
required

Removes a custom chat room attribute.

Note
This method does not remove attributes set by other members.

This is an asynchronous method.

Parameters
aChatroomIdThe chat room ID.
keyThe key of the chat room attribute to remove.
aCompletionBlockThe completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure.

◆ removeChatroomAttributeForced:key:completionBlock:

- (void) removeChatroomAttributeForced: (NSString *_Nonnull)  roomId
key: (NSString *_Nonnull)  key
completionBlock: (void(^)(AgoraChatError *_Nullable aError))  completionBlock 
required

Removes custom chat room attributes forcibly.

Note
This method removes attributes set by other members.

This is an asynchronous method.

Parameters
aChatroomIdThe chat room ID.
keyThe keys of the custom chat room attributes to remove.
aCompletionBlockThe completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key and the value is the reason for the failure.

◆ removeChatroomAttributes:attributes:completionBlock:

- (void) removeChatroomAttributes: (NSString *_Nonnull)  roomId
attributes: (NSArray< __kindof NSString * > *_Nonnull)  keyValues
completionBlock: (void(^)(AgoraChatError *_Nullable aError, NSDictionary< NSString *, AgoraChatError * > *_Nullable failureKeys))  completionBlock 
required

Removes custom chat room attributes.

Note
This method does not remove attributes set by other members.

This is an asynchronous method.

Parameters
aChatroomIdThe chat room ID.
attributesThe keys of the chat room attributes to remove.
aCompletionBlockThe completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure.

◆ removeChatroomAttributesForced:attributes:completionBlock:

- (void) removeChatroomAttributesForced: (NSString *_Nonnull)  roomId
attributes: (NSArray< __kindof NSString * > *_Nonnull)  keyValues
completionBlock: (void(^)(AgoraChatError *_Nullable aError, NSDictionary< NSString *, AgoraChatError * > *_Nullable failureKeys))  completionBlock 
required

Removes custom chat room attributes forcibly.

Note
This method removes attributes set by other members.

This is an asynchronous method.

Parameters
aChatroomIdThe chat room ID.
keyValuesThe array of chat room attribute keys.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ removeDelegate:

- (void) removeDelegate: (id< AgoraChatroomManagerDelegate > _Nonnull)  aDelegate
required

Removes the delegate.

Parameters
aDelegateThe delegate that you want to remove.

◆ removeMembers:fromChatroom:completion:

- (void) removeMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Removes members from a chatroom.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aMembersThe users to be removed from the chatroom.
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ removeMembers:fromChatroom:error:

- (AgoraChatroom *_Nullable) removeMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Removes members from a chatroom.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aMembersThe users to be removed from the chatroom.
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance.

◆ removeWhiteListMembers:fromChatroom:completion:

- (void) removeWhiteListMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Removes members from the allowlist.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

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

◆ removeWhiteListMembers:fromChatroom:error:

- (AgoraChatroom *_Nullable) removeWhiteListMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Removes the members of 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.
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ setChatroomAttribute:key:value:autoDelete:completionBlock:

- (void) setChatroomAttribute: (NSString *_Nonnull)  roomId
key: (NSString *_Nonnull)  key
value: (NSString *_Nonnull)  value
autoDelete: (BOOL)  autoDelete
completionBlock: (void(^)(AgoraChatError *_Nullable aError))  completionBlock 
required

Sets a custom chat room attribute.

Note
This method does not overwrite attributes set by others.

This is an asynchronous method.

Parameters
roomIdThe chat room ID.
keyThe chat room attribute key that specifies the attribute name. The attribute name can contain 128 characters at most. A chat room can have a maximum of 100 custom attributes. The following character sets are supported:
  • 26 lowercase English letters (a-z)
  • 26 uppercase English letters (A-Z)
  • 10 numbers (0-9)
  • "_", "-", "."
valueThe chat room attribute value. The attribute value can contain a maximum of 4096 characters. The total length of custom chat room attributes cannot exceed 10 GB for each app.
autoDeleteWhether to delete the custom chat room attributes set by the member when he or she exits the chat room.
  • (Default)YES: Yes;
  • NO: No.
aCompletionBlockThe completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure.

◆ setChatroomAttributeForced:key:value:autoDelete:completionBlock:

- (void) setChatroomAttributeForced: (NSString *_Nonnull)  roomId
key: (NSString *_Nonnull)  key
value: (NSString *_Nonnull)  value
autoDelete: (BOOL)  autoDelete
completionBlock: (void(^)(AgoraChatError *_Nullable aError))  completionBlock 
required

Sets a custom chat room attribute forcibly.

Note
This method overwrites attributes set by others.

This is an asynchronous method.

Parameters
roomIdThe chat room ID.
keyThe chat room attribute key that specifies the attribute name. The attribute name can contain 128 characters at most. A chat room can have a maximum of 100 custom attributes. The following character sets are supported:
  • 26 lowercase English letters (a-z)
  • 26 uppercase English letters (A-Z)
  • 10 numbers (0-9)
  • "_", "-", "."
valueThe attribute value to set. A single Value can not exceed 4096 characters. The total attribute can not exceed 10 GB.
autoDeleteWhether to delete the chat room attributes set by the member when he or she exits the chat room.
  • (Default)YES: Yes;
  • NO: No.
aCompletionBlockThe completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure.

◆ setChatroomAttributes:attributes:autoDelete:completionBlock:

- (void) setChatroomAttributes: (NSString *_Nonnull)  roomId
attributes: (NSDictionary< NSString *, NSString * > *_Nonnull)  keyValues
autoDelete: (BOOL)  autoDelete
completionBlock: (void(^)(AgoraChatError *_Nullable aError, NSDictionary< NSString *, AgoraChatError * > *_Nullable failureKeys))  completionBlock 
required

Sets custom attributes of the chat room.

Note
This method does not overwrite attributes set by others.

This is an asynchronous method.

Parameters
roomIdThe chat room ID.
attributesThe custom chat room attributes in key-value pairs, where the key is the attribute name and the value is the attribute value.
autoDeleteWhether to delete the chat room attributes set by the member when he or she exits the chat room.
  • (Default)YES: Yes;
  • NO: No.
aCompletionBlockThe completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure.

◆ setChatroomAttributesForced:attributes:autoDelete:completionBlock:

- (void) setChatroomAttributesForced: (NSString *_Nonnull)  roomId
attributes: (NSDictionary< NSString *, NSString * > *_Nonnull)  keyValues
autoDelete: (BOOL)  autoDelete
completionBlock: (void(^)(AgoraChatError *_Nullable aError, NSDictionary< NSString *, AgoraChatError * > *_Nullable failureKeys))  completionBlock 
required

Sets custom chat room attributes forcibly.

Note
This method overwrites attributes set by others.

This is an asynchronous method.

Parameters
roomIdThe chat room ID.
attributesThe custom chat room attributes in key-value pairs, where the key is the attribute name and the value is the attribute value.
aCompletionBlockThe completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure.

◆ unblockMembers:fromChatroom:completion:

- (void) unblockMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Removes users from the chatroom blocklist.

Only the chatroom owner can call this method.

This is an asynchronous method.

Parameters
aMembersThe users to be removed from the blocklist.
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ unblockMembers:fromChatroom:error:

- (AgoraChatroom *_Nullable) unblockMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Removes users from chatroom blocklist.

Only the chatroom owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aMembersThe users to be removed from the blocklist.
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance.

◆ unmuteAllMembersFromChatroom:completion:

- (void) unmuteAllMembersFromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Unmute all members.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ unmuteAllMembersFromChatroom:error:

- (AgoraChatroom *_Nullable) unmuteAllMembersFromChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Unmute all members.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ unmuteMembers:fromChatroom:completion:

- (void) unmuteMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Unmutes chatroom members.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aMembersThe list of unmute.
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ unmuteMembers:fromChatroom:error:

- (AgoraChatroom *_Nullable) unmuteMembers: (NSArray< NSString * > *_Nonnull)  aMembers
fromChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Unmutes chatroom 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 unmute.
aChatroomIdThe chatroom ID.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ updateChatroomAnnouncementWithId:announcement:completion:

- (void) updateChatroomAnnouncementWithId: (NSString *_Nonnull)  aChatroomId
announcement: (NSString *_Nullable)  aAnnouncement
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Changes the announcement of chatroom.

Only the chatroom owner or admin can call this method.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aAnnouncementThe announcement of the chatroom.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ updateChatroomAnnouncementWithId:announcement:error:

- (AgoraChatroom *_Nullable) updateChatroomAnnouncementWithId: (NSString *_Nonnull)  aChatroomId
announcement: (NSString *_Nullable)  aAnnouncement
error: (AgoraChatError **_Nullable)  pError 
required

Changes the announcement of the chatroom.

Only the chatroom owner or admin can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
aAnnouncementThe announcement of the chatroom.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ updateChatroomOwner:newOwner:completion:

- (void) updateChatroomOwner: (NSString *_Nonnull)  aChatroomId
newOwner: (NSString *_Nonnull)  aNewOwner
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Changes the chatroom owner.

Only the chatroom owner can call this method.

This is an asynchronous method.

Parameters
aChatroomIdThe chatroom ID.
aNewOwnerThe new owner.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ updateChatroomOwner:newOwner:error:

- (AgoraChatroom *_Nullable) updateChatroomOwner: (NSString *_Nonnull)  aChatroomId
newOwner: (NSString *_Nonnull)  aNewOwner
error: (AgoraChatError **_Nullable)  pError 
required

Changes the chatroom owner.

Only the chatroom owner can call this method.

This is a synchronous method and blocks the current thread.

Parameters
aChatroomIdThe chatroom ID.
aNewOwnerThe new owner.
pErrorThe error information if the method fails: Error.
Returns
The chatroom instance. See AgoraChatroom.

◆ updateDescription:forChatroom:completion:

- (void) updateDescription: (NSString *_Nullable)  aDescription
forChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Changes the chatroom's description.

Only the chatroom owner can call this method.

This is an asynchronous method.

Parameters
aDescriptionThe new description.
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ updateDescription:forChatroom:error:

- (AgoraChatroom *_Nullable) updateDescription: (NSString *_Nullable)  aDescription
forChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Changes chatroom description.

Only the chatroom owner can call this method.

This is a synchronous method and blocks the current thread.

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

◆ updateSubject:forChatroom:completion:

- (void) updateSubject: (NSString *_Nullable)  aSubject
forChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(AgoraChatroom *_Nullable aChatroom, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Changes the chatroom subject.

Only the chatroom owner can call this method.

This is an asynchronous method.

Parameters
aSubjectThe new subject of the chatroom.
aChatroomIdThe chatroom ID.
aCompletionBlockThe completion block, which contains the error message if the method call fails.

◆ updateSubject:forChatroom:error:

- (AgoraChatroom *) updateSubject: (NSString *_Nullable)  aSubject
forChatroom: (NSString *_Nonnull)  aChatroomId
error: (AgoraChatError **_Nullable)  pError 
required

Changes the chatroom‘s subject.

Only the chatroom owner can call this method.

This is a synchronous method and blocks the current thread.

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

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