#import <IEMGroupManager.h>
@header IEMGroupManager.h @abstract This protocol defines the group operations.
- Author
- Hyphenate
- Version
- 3.00
The group operations.
◆ acceptInvitationFromGroup:inviter:completion:
- (void) acceptInvitationFromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
inviter: |
|
(NSString *_Nonnull) |
aUsername |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Accepts a group invitation.
This is an asynchronous method.
- Parameters
-
aGroupId | The group ID. |
aUsername | The user who initiates the invitation. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ acceptInvitationFromGroup:inviter:error:
- (EMGroup *_Nullable) acceptInvitationFromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
inviter: |
|
(NSString *_Nonnull) |
aUsername |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Accepts a group invitation.
This is a synchronous method and blocks the current thread.
- Parameters
-
aGroupId | The group ID. |
aUsername | The user who initiates the invitation. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ acceptJoinApplication:applicant:
- (EMError *) 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
-
aGroupId | The group ID. |
aUsername | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Adds group admin.
This is an asynchronous method.
Only the group owner can call this method.
- Parameters
-
aAdmin | The admin to be added. |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ addAdmin:toGroup:error:
- (EMGroup *_Nullable) addAdmin: |
|
(NSString *_Nonnull) |
aAdmin |
toGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aAdmin | The admin to be added. |
aGroupId | The group ID. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ addDelegate:delegateQueue:
- (void) addDelegate: |
|
(id< EMGroupManagerDelegate > _Nonnull) |
aDelegate |
delegateQueue: |
|
(dispatch_queue_t _Nullable) |
aQueue |
|
|
| |
|
required |
Adds delegate.
- Parameters
-
aDelegate | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Invites users to join a group.
- Parameters
-
aUsers | The users who are invited to join the group. |
aGroupId | The group ID. |
aMessage | The welcome message. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ addOccupants:toGroup:welcomeMessage:error:
- (EMGroup *_Nullable) addOccupants: |
|
(NSArray< NSString * > *_Nonnull) |
aOccupants |
toGroup: |
|
(NSString *_Nonnull) |
aGroupId |
welcomeMessage: |
|
(NSString *_Nullable) |
aWelcomeMessage |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Invites users to join a group.
This is a synchronous method and blocks the current thread.
- Parameters
-
aOccupants | The users who are invited. |
aGroupId | The group ID. |
aWelcomeMessage | The welcome message. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Adds members to the allowlist.
Only the chatroom owner or admin can call this method.
- Parameters
-
aMembers | The members to be added to the allowlist. |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ addWhiteListMembers:fromGroup:error:
- (EMGroup *_Nullable) addWhiteListMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aMembers | The members to be added to the allowlist. |
aGroupId | The group ID. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ applyJoinPublicGroup:message:error:
- (EMGroup *_Nullable) applyJoinPublicGroup: |
|
(NSString *_Nonnull) |
aGroupId |
message: |
|
(NSString *_Nullable) |
aMessage |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
The request to join a public group. The group style should be EMGroupStylePublicJoinNeedApproval.
This is a synchronous method and blocks the current thread.
- Parameters
-
aGroupId | The public group ID。 |
aMessage | The message in the request. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Approves a group request.
Only the group owner can call this method.
This is an asynchronous method.
- Parameters
-
aGroupId | The group ID. |
aUsername | The user who sends the request for join the group. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ blockGroup:completion:
- (void) blockGroup: |
|
(NSString *_Nonnull) |
aGroupId |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_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
-
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ blockGroup:error:
- (EMGroup *_Nullable) blockGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aGroupId | The group ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Adds users to blocklist of the group.
Only the group owner can call this method.
- Parameters
-
aMembers | The users to be added to the blockList. |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ blockOccupants:fromGroup:error:
- (EMGroup *_Nullable) blockOccupants: |
|
(NSArray< NSString * > *_Nonnull) |
aOccupants |
fromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aOccupants | The users to be added to the blockList. |
aGroupId | The group ID. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ changeDescription:forGroup:error:
- (EMGroup *_Nullable) changeDescription: |
|
(NSString *_Nullable) |
aDescription |
forGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aDescription | The new group description. |
aGroupId | The group ID. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ changeGroupSubject:forGroup:error:
- (EMGroup *_Nullable) changeGroupSubject: |
|
(NSString *_Nullable) |
aSubject |
forGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aSubject | The new subject of the group. |
aGroupId | The group ID. |
pError | The 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: |
|
(EMGroupOptions *_Nullable) |
aSetting |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Creates a group.
This is an asynchronous method.
- Parameters
-
aSubject | The subject of the group. |
aDescription | The description of the group. |
aInvitees | The members of the group. Do not include the creator. |
aMessage | The invitation message. |
aSetting | The group options. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ createGroupWithSubject:description:invitees:message:setting:error:
- (EMGroup *_Nullable) createGroupWithSubject: |
|
(NSString *_Nullable) |
aSubject |
description: |
|
(NSString *_Nullable) |
aDescription |
invitees: |
|
(NSArray< NSString * > *_Nullable) |
aInvitees |
message: |
|
(NSString *_Nullable) |
aMessage |
setting: |
|
(EMGroupOptions *_Nullable) |
aSetting |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Creates a group.
This is a synchronous method and blocks the current thread.
- Parameters
-
aSubject | The subject of the group. |
aDescription | The description of the group. |
aInvitees | The members of the group. Do not include the creator. |
aMessage | The invitation message. |
aSetting | The group options. |
pError | The 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(^)(EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Declines a group invitation.
This is an asynchronous method.
- Parameters
-
aGroupId | The group ID. |
aInviter | The user who send the invitation. |
aReason | The reason of declining. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ declineInvitationFromGroup:inviter:reason:
- (EMError *) 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
-
aGroupId | The group ID. |
aUsername | The user who initiates the invitation. |
aReason | The reason for declining. |
- Returns
- The error information if the method fails: Error.
◆ declineJoinApplication:applicant:reason:
- (EMError *) 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
-
aGroupId | The group ID. |
aUsername | The user who sends the request for join the group. |
aReason | The reason of declining. |
- Returns
- Error
◆ declineJoinGroupRequest:sender:reason:completion:
- (void) declineJoinGroupRequest: |
|
(NSString *_Nonnull) |
aGroupId |
sender: |
|
(NSString *_Nonnull) |
aUsername |
reason: |
|
(NSString *_Nullable) |
aReason |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Declines a group request.
Only the group owner can call this method.
This is an asynchronous method.
- Parameters
-
aGroupId | The group ID. |
aUsername | The user who sends the request for join the group. |
aReason | The reason for declining. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ destroyGroup:
- (EMError *) 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
-
- 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(^)(EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Destroys a group.
Only the group owner can call this method.
- Parameters
-
aGroupId | The group ID. |
aCompletionBlock | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Downloads the share file of group.
- Parameters
-
aGroupId | The group ID. |
aFilePath | The path of file. |
aSharedFileId | The shared file ID. |
aProgressBlock | The block of attachment upload progress |
aCompletionBlock | The 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, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the mutelist of the group from the server.
Only the group owner or admin can call this method.
- Parameters
-
aGroupId | The group ID. |
aPageNum | The page number. |
aPageSize | The page size. |
aCompletionBlock | The 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, EMError *_Nullable)) |
completionBlock |
|
|
| |
|
required |
Gets all custom attributes of a group member.
- Parameters
-
groupId | The group ID. |
userId | The user ID of the group member whose all custom attributes are retrieved. |
completion | The completion block, which contains the map of all retrieved attributes and the error message (EMError) 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, EMError is empty.
- If the method call fails, the SDK returns the reason for the failure (EMError). In this case, the map of custom attributes is empty.
- If both the map of custom attributes and EMError 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, EMError *_Nullable error)) |
completionBlock |
|
|
| |
|
required |
Gets custom attributes of multiple group members by attribute key.
- Parameters
-
groupId | The group ID. |
userIds | The array of user IDs of group members whose custom attributes are retrieved.(limitation is ten.More than callback error. ) |
keys | The array of keys of custom attributes to be retrieved. |
completion | The completion block, which contains the map of retrieved attributes and the error message (EMError) 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, EMError 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 (EMError). In this case, the map of custom attributes is empty for the group members.
- If both the map of custom attributes and EMError are empty, no custom attribute is set for the group members.
|
◆ getGroupAnnouncementWithId:completion:
- (void) getGroupAnnouncementWithId: |
|
(NSString *_Nonnull) |
aGroupId |
completion: |
|
(void(^)(NSString *aAnnouncement, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the announcement of group from the server.
- Parameters
-
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getGroupAnnouncementWithId:error:
- (NSString *_Nullable) getGroupAnnouncementWithId: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the announcement of group from the server.
- Parameters
-
aGroupId | The group ID. |
pError | The 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, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the group's blocklist.
Only the group owner or admin can call this method.
- Parameters
-
aGroupId | The group ID. |
aPageNum | The page number. |
aPageSize | The page size. |
aCompletionBlock | The 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: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the blocklist of group from the server.
Only the group owner or admin can call this method.
- Parameters
-
aGroupId | The group ID. |
aPageNum | The page number. |
aPageSize | The page size. |
pError | The 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< EMGroupSharedFile * > *_Nullable aList, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the share files of group from the server.
This is an asynchronous method.
- Parameters
-
aGroupId | The group ID. |
aPageNum | The page number. |
aPageSize | The page size. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getGroupFileListWithId:pageNumber:pageSize:error:
- (NSArray< EMGroupSharedFile * > *_Nullable) getGroupFileListWithId: |
|
(NSString *_Nonnull) |
aGroupId |
pageNumber: |
|
(NSInteger) |
aPageNum |
pageSize: |
|
(NSInteger) |
aPageSize |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the share files of group from the server.
- Parameters
-
aGroupId | The group ID. |
aPageNum | The page number. |
aPageSize | The page size. |
pError | The 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(^)(EMCursorResult< NSString * > *aResult, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the list of group members from the server.
- Parameters
-
aGroupId | The group ID. |
aCursor | The cursor when joins the group. Sets the parameter as nil for the first time. |
aPageSize | The page size. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getGroupMemberListFromServerWithId:cursor:pageSize:error:
- (EMCursorResult< NSString * > *) getGroupMemberListFromServerWithId: |
|
(NSString *_Nonnull) |
aGroupId |
cursor: |
|
(NSString *_Nullable) |
aCursor |
pageSize: |
|
(NSInteger) |
aPageSize |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the list of group members from the server.
This is a synchronous method and blocks the current thread.
- Parameters
-
aGroupId | The group ID. |
aCursor | The cursor when joins the group. Sets the parameter as nil for the first time. |
aPageSize | The expect entry number of the list. |
pError | The 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, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the mutelist of the group from the server.
Only the group owner or admin can call this method.
- Parameters
-
aGroupId | The group ID. |
aPageNum | The page number. |
aPageSize | The page size. |
aCompletionBlock | The 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: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the mutelist of the group from the server.
Only the group owner or admin can call this method.
- Parameters
-
aGroupId | The group ID. |
aPageNum | The page number. |
aPageSize | The page size. |
pError | The error information if the method fails: Error. |
- Returns
- The mutelist of the group.
◆ getGroupSpecificationFromServerWithId:completion:
- (void) getGroupSpecificationFromServerWithId: |
|
(NSString *_Nonnull) |
aGroupId |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Fetches the group specification, including: ID, name, description, setting, owner, admins.
This is an asynchronous method.
- Parameters
-
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getGroupSpecificationFromServerWithId:error:
- (EMGroup *_Nullable) getGroupSpecificationFromServerWithId: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aGroupId | The group ID. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ getGroupSpecificationFromServerWithId:fetchMembers:completion:
- (void) getGroupSpecificationFromServerWithId: |
|
(NSString *_Nonnull) |
aGroupId |
fetchMembers: |
|
(BOOL) |
fetchMembers |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Fetches the group specification, including: ID, name, description, setting, owner, admins.
- Parameters
-
aGroupId | The group ID. |
fetchMembers | Whether to fetch the group members. The default action fetches at most 200 members. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getGroupSpecificationFromServerWithId:fetchMembers:error:
- (EMGroup *_Nullable) getGroupSpecificationFromServerWithId: |
|
(NSString *_Nonnull) |
aGroupId |
fetchMembers: |
|
(BOOL) |
fetchMembers |
error: |
|
(EMError **_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
-
aGroupId | The group ID. |
fetchMembers | Whether to fetch the group members. The default action fetches at most 200 members. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ getGroupsWithoutPushNotification:
- (NSArray *) getGroupsWithoutPushNotification: |
|
(3_3_2) |
|
|
|
(3_8_3) |
|
|
|
("Use -IEMPushManager::noPushGroups") |
EM_DEPRECATED_IOS |
|
|
| |
|
required |
Gets the list of groups which have disabled Apple Push Notification Service.
- Parameters
-
pError | The 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, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the allowlist of group from the server.
- Parameters
-
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getGroupWhiteListFromServerWithId:error:
- (NSArray *) getGroupWhiteListFromServerWithId: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the allowlist of group from the server.
- Parameters
-
aGroupId | The group ID. |
pError | The error information if the method fails: Error. |
- Returns
- The allowList of the group.
◆ getJoinedGroups
- (NSArray< EMGroup * > *_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, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
required |
Gets groups count of the current user joined from the server.
This is an asynchronous method.
- Parameters
-
aCompletionBlock | The 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
-
aPageNum | The cursor when joins the group. Sets the parameter as nil for the first time. |
aPageSize | The number of results expected to be returned, if <0 then all results will be returned at once. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getJoinedGroupsFromServerWithPage:pageSize:error:
- (NSArray< EMGroup * > *_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
-
aPageNum | Gets the cursor to join the group. Sets the parameter as nil for the first time. |
aPageSize | The number of results expected to be returned. If <0 then all results will be returned at once |
pError | The 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< EMGroup * > *_Nullable aList, EMError *_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
-
aPageNum | The 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. |
aPageSize | The number of groups that you expect to get on each page. The value range is [1,20]. |
aNeedMemberCount | need member count Whether the number of group members is required.
|
aNeedRole | need role Whether the role of the current user in the group is required.
|
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getPublicGroupsFromServerWithCursor:pageSize:completion:
- (void) getPublicGroupsFromServerWithCursor: |
|
(NSString *_Nullable) |
aCursor |
pageSize: |
|
(NSInteger) |
aPageSize |
completion: |
|
(void(^)(EMCursorResult< EMGroup * > *_Nullable aResult, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets public groups with the specified range from the server.
This is an asynchronous method.
- Parameters
-
aCursor | Gets the cursor to join the group. Sets the parameter as nil for the first time. |
aPageSize | The number of results expected to be returned. If the number is less than 0 then all results will be returned at once. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getPublicGroupsFromServerWithCursor:pageSize:error:
- (EMCursorResult< EMGroup * > *_Nullable) getPublicGroupsFromServerWithCursor: |
|
(NSString *_Nullable) |
aCursor |
pageSize: |
|
(NSInteger) |
aPageSize |
error: |
|
(EMError **_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
-
aCursor | The cursor to join the group. Sets the parameter as nil for the first time. |
aPageSize | The number of results expected to be returned. If the number is less than 0 then all results will be returned at once. |
pError | The error information if the method fails: Error. |
- Returns
- The result.
◆ ignoreGroupPush:ignore:
Blocks/unblocks group message‘s push notification.
This is a synchronous method and blocks the current thread.
Deprecated, please use IEMPushManager::updatePushServiceForGroups:disablePush:
instead.
- Parameters
-
aGroupId | The group ID. |
aIsIgnore | Whether to show or ignore the push notification. |
- Returns
- The error information if the method fails: Error.
◆ ignoreGroupsPush:ignore:
Blocks/unblocks the group message‘s push notification.
Deprecated, please use IEMPushManager::updatePushServiceForGroups:disablePush:
instead.
This is a synchronous method and blocks the current thread.
- Parameters
-
aGroupIDs | The group ID list. |
aIsIgnore | Whether to show or ignore the push notification. |
- Returns
- The error information if the method fails: Error.
◆ isMemberInWhiteListFromServerWithGroupId:completion:
- (void) isMemberInWhiteListFromServerWithGroupId: |
|
(NSString *_Nonnull) |
aGroupId |
completion: |
|
(void(^)(BOOL inWhiteList, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets whether the member is on the allowlist.
- Parameters
-
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ isMemberInWhiteListFromServerWithGroupId:error:
- (BOOL) isMemberInWhiteListFromServerWithGroupId: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets whether the member is on the allowlist.
- Parameters
-
aGroupId | The group ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Joins a public group. The group style should be EMGroupStylePublicOpenJoin.
- Parameters
-
aGroupId | The public group ID。 |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ joinPublicGroup:error:
- (EMGroup *_Nullable) joinPublicGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Joins a public group. The group style should be EMGroupStylePublicOpenJoin.
This is a synchronous method and blocks the current thread.
- Parameters
-
aGroupId | The public group ID. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ leaveGroup:completion:
- (void) leaveGroup: |
|
(NSString *_Nonnull) |
aGroupId |
completion: |
|
(void(^)(EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Leaves a group. The owner can't leave the group, can only destroy the group.
- Parameters
-
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ leaveGroup:error:
- (void) leaveGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aGroupId | The group ID. |
pError | The error information if the method fails: Error. |
◆ muteAllMembersFromGroup:completion:
- (void) muteAllMembersFromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
mute all members.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ muteAllMembersFromGroup:error:
- (EMGroup *_Nullable) muteAllMembersFromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aGroupId | The group ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Mutes group members.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aMuteMembers | The list of mute, type is <NSString> |
aMuteMilliseconds | Muted time duration in millisecond |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ muteMembers:muteMilliseconds:fromGroup:error:
- (EMGroup *_Nullable) muteMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMuteMembers |
muteMilliseconds: |
|
(NSInteger) |
aMuteMilliseconds |
fromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aMuteMembers | The list of members to be muted. |
aMuteMilliseconds | The muted time duration in millisecond. |
aGroupId | The group ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Removes the group admin.
Only the group owner can call this method.
This is an asynchronous method.
- Parameters
-
aAdmin | The admin to be removed. |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ removeAdmin:fromGroup:error:
- (EMGroup *_Nullable) removeAdmin: |
|
(NSString *_Nonnull) |
aAdmin |
fromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aAdmin | The admin to be removed. |
aGroupId | The group ID. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ removeDelegate:
- (void) removeDelegate: |
|
(id _Nonnull) |
aDelegate |
|
|
required |
Removes delegate.
- Parameters
-
aDelegate | The delegate to be removed. |
◆ removeGroupSharedFileWithId:sharedFileId:completion:
- (void) removeGroupSharedFileWithId: |
|
(NSString *_Nonnull) |
aGroupId |
sharedFileId: |
|
(NSString *_Nonnull) |
aSharedFileId |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Removes the share file of group.
- Parameters
-
aGroupId | The group ID. |
aSharedFileId | The share file ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ removeGroupSharedFileWithId:sharedFileId:error:
- (EMGroup *_Nullable) removeGroupSharedFileWithId: |
|
(NSString *_Nonnull) |
aGroupId |
sharedFileId: |
|
(NSString *_Nonnull) |
aSharedFileId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Removes the share file of the group.
This is a synchronous method and blocks the current thread.
- Parameters
-
aGroupId | The group ID. |
aSharedFileId | The share file ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Removes members from the group.
Only the group owner can call this method.
- Parameters
-
aUsers | The members to be removed from the group. |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ removeOccupants:fromGroup:error:
- (EMGroup *_Nullable) removeOccupants: |
|
(NSArray< NSString * > *_Nonnull) |
aOccupants |
fromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aOccupants | The users to be removed from the group. |
aGroupId | The group ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_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
-
aMembers | The members to be removed from the allowlist. |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ removeWhiteListMembers:fromGroup:error:
- (EMGroup *_Nullable) removeWhiteListMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aMembers | The members to be removed from the allowlist. |
aGroupId | The group ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Requests to join a public group. The group style should be EMGroupStylePublicJoinNeedApproval.
- Parameters
-
aGroupId | The public group ID. |
aMessage | The information in the request. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ searchPublicGroupWithId:completion:
- (void) searchPublicGroupWithId: |
|
(NSString *_Nonnull) |
aGroundId |
completion: |
|
(void(^)(EMGroup *aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Searches public group with group ID.
- Parameters
-
aGroundId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ searchPublicGroupWithId:error:
- (EMGroup *_Nullable) searchPublicGroupWithId: |
|
(NSString *_Nonnull) |
aGroundId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Searches a public group with the group ID.
This is a synchronous method and blocks the current thread.
- Parameters
-
aGroundId | The group ID. |
pError | The 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(^)(EMError *_Nullable error)) |
completionBlock |
|
|
| |
|
required |
Sets custom attributes of a group member.
- Parameters
-
groupId | The group ID. |
userId | The user ID of the group member for whom the custom attributes are set. |
attributes | The 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. |
completion | The completion block, which contains the error message if the method call fails. |
◆ unblockGroup:completion:
- (void) unblockGroup: |
|
(NSString *_Nonnull) |
aGroupId |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Unblocks group messages.
- Parameters
-
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ unblockGroup:error:
- (EMGroup *_Nullable) unblockGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Unblocks group messages.
This is a synchronous method and blocks the current thread.
- Parameters
-
aGroupId | The group ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Removes users out of the blocklist of the group.
Only the group owner can call this method.
- Parameters
-
aMembers | The users to be removed from the blockList. |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ unblockOccupants:forGroup:error:
- (EMGroup *_Nullable) unblockOccupants: |
|
(NSArray< NSString * > *_Nonnull) |
aOccupants |
forGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aOccupants | The users to be removed from the blockList. |
aGroupId | The group ID. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
◆ unmuteAllMembersFromGroup:completion:
- (void) unmuteAllMembersFromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
completion: |
|
(void(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Unmutes all members.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ unmuteAllMembersFromGroup:error:
- (EMGroup *_Nullable) unmuteAllMembersFromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aGroupId | The group ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Unmutes group members.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aMembers | The list of members to be unmuted. |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ unmuteMembers:fromGroup:error:
- (EMGroup *_Nullable) unmuteMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromGroup: |
|
(NSString *_Nonnull) |
aGroupId |
error: |
|
(EMError **_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
-
aMembers | The list of members to be unmuted. |
aGroupId | The group ID. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Changes the group description.
Only the group owner can call this method.
- Parameters
-
aDescription | The new group‘s description. |
aGroupId | The group ID. |
aCompletionBlock | The 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(^)(EMGroup *_Nullable aGroup, EMError *_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
-
aGroupId | The group ID. |
aAnnouncement | The announcement of the group. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ updateGroupAnnouncementWithId:announcement:error:
- (EMGroup *_Nullable) updateGroupAnnouncementWithId: |
|
(NSString *_Nonnull) |
aGroupId |
announcement: |
|
(NSString *_Nullable) |
aAnnouncement |
error: |
|
(EMError **_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
-
aGroupId | The group ID. |
aAnnouncement | The announcement of the group. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Updates the extended information of the group.
Only the group owner can call this method.
- Parameters
-
aGroupId | The group ID. |
aExt | The extended information of the group. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ updateGroupExtWithId:ext:error:
- (EMGroup *_Nullable) updateGroupExtWithId: |
|
(NSString *_Nonnull) |
aGroupId |
ext: |
|
(NSString *_Nullable) |
aExt |
error: |
|
(EMError **_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
-
aGroupId | The group ID. |
aExt | The extended information of the group. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Changes the owner of the group.
Only the group owner can call this method.
- Parameters
-
aGroupId | The group ID. |
aNewOwner | The new group owner. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ updateGroupOwner:newOwner:error:
- (EMGroup *_Nullable) updateGroupOwner: |
|
(NSString *_Nonnull) |
aGroupId |
newOwner: |
|
(NSString *_Nonnull) |
aNewOwner |
error: |
|
(EMError **_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
-
aGroupId | The group ID. |
aNewOwner | The new group owner. |
pError | The 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(^)(EMGroup *_Nullable aGroup, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Changes the group subject.
Only the group owner can call this method.
- Parameters
-
aSubject | The new subject of the group. |
aGroupId | The group ID. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ updatePushServiceForGroup:isPushEnabled:completion:
Blocks/unblocks the group message‘s push notification.
Deprecated, please use IEMPushManager::updatePushServiceForGroups:disablePush:completion:
instead.
- Parameters
-
aGroupId | The group ID. |
aIsEnable | Whether to block or unblock the push notification. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ updatePushServiceForGroups:isPushEnabled:completion:
Blocks/unblocks the group message‘s push notification.
Deprecated, please use IEMPushManager::updatePushServiceForGroups:disablePush:completion:
instead.
- Parameters
-
aGroupIDs | The group ID list. |
aIsEnable | Whether to enable group messages push. |
aCompletionBlock | The 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(^)(EMGroupSharedFile *_Nullable aSharedFile, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Uploads the share file of group.
- Parameters
-
aGroupId | The group ID. |
aFilePath | The path of file. |
pError | The error information if the method fails: Error. |
- Returns
- The group instance.
The documentation for this protocol was generated from the following file: