NIMSuperTeamManager Protocol Reference

Conforms to NSObject
Declared in NIMSuperTeamManagerProtocol.h

Overview

Supergroup interface

– allMyTeams required method

Get all groups

- (nullable NSArray<NIMTeam*> *)allMyTeams

Return Value

list of all groups

Discussion

Get all groups

Declared In

NIMSuperTeamManagerProtocol.h

– teamById: required method

Get specific group information based on the group ID

- (nullable NIMTeam *)teamById:(NSString *)teamId

Parameters

teamId

Group ID

Return Value

Group info

Discussion

Get specific group information based on the group ID

If the current user are not in the group, this interface returns nil

Declared In

NIMSuperTeamManagerProtocol.h

– isMyTeam: required method

Determine if it is my group based on the group ID

- (BOOL)isMyTeam:(NSString *)teamId

Parameters

teamId

Group ID

Return Value

result

Discussion

Determine if it is my group based on the group ID

Declared In

NIMSuperTeamManagerProtocol.h

– quitTeam:completion: required method

Leave a group

- (void)quitTeam:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

teamId

Group ID

completion

Completion callback

Discussion

Leave a group

Declared In

NIMSuperTeamManagerProtocol.h

– addUsers:toTeam:postscript:attach:completion: required method

Send an invite request

- (void)addUsers:(NSArray<NSString*> *)users toTeam:(NSString *)teamId postscript:(nullable NSString *)postscript attach:(nullable NSString *)attach completion:(nullable NIMTeamMemberHandler)completion

Parameters

users

user ID list

teamId

Group ID

completion

Completion callback

Discussion

Send an invite request

group owners and administrators can invite users

Declared In

NIMSuperTeamManagerProtocol.h

– kickUsers:fromTeam:completion: required method

Remove members from a group

- (void)kickUsers:(NSArray<NSString*> *)users fromTeam:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

users

list of user IDs to be removed

teamId

Group ID

completion

Completion callback

Discussion

Remove members from a group

Group owners or administrators can remove members. Administrators cannot remove the group owners or other administrators

Declared In

NIMSuperTeamManagerProtocol.h

– updateTeamName:teamId:completion: required method

Update the group name

- (void)updateTeamName:(NSString *)teamName teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

teamName

group name

teamId

Group ID

completion

Completion callback

Discussion

Update the group name

Declared In

NIMSuperTeamManagerProtocol.h

– updateTeamAvatar:teamId:completion: required method

Update the group avatar

- (void)updateTeamAvatar:(NSString *)teamAvatarUrl teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

teamAvatarUrl

group avatar URL

teamId

Group ID

completion

Completion callback

Discussion

Update the group avatar

Declared In

NIMSuperTeamManagerProtocol.h

– updateTeamJoinMode:teamId:completion: required method

Update the verification mode for joining a group

- (void)updateTeamJoinMode:(NIMTeamJoinMode)joinMode teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

joinMode

verification method

teamId

Group ID

completion

Completion callback

Discussion

Update the verification mode for joining a group

Declared In

NIMSuperTeamManagerProtocol.h

– updateTeamBeInviteMode:teamId:completion: required method

Update the verification mode for being invited to join a group

- (void)updateTeamBeInviteMode:(NIMTeamBeInviteMode)beInviteMode teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

beInviteMode

Invite mode

teamId

Group ID

completion

Completion callback

Discussion

Update the verification mode for being invited to join a group

Declared In

NIMSuperTeamManagerProtocol.h

– updateTeamIntro:teamId:completion: required method

Update the group profile

- (void)updateTeamIntro:(NSString *)intro teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

intro

group intro

teamId

Group ID

completion

Completion callback

Discussion

Update the group profile

Declared In

NIMSuperTeamManagerProtocol.h

– updateTeamAnnouncement:teamId:completion: required method

Update the group announcement

- (void)updateTeamAnnouncement:(NSString *)announcement teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

announcement

group announcement

teamId

Group ID

completion

Completion callback

Discussion

Update the group announcement

Declared In

NIMSuperTeamManagerProtocol.h

– updateTeamCustomInfo:teamId:completion: required method

Update the custom setting of a group profile

- (void)updateTeamCustomInfo:(NSString *)info teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

info

user defined info

teamId

Group ID

completion

Completion callback

Discussion

Update the custom setting of a group profile

Declared In

NIMSuperTeamManagerProtocol.h

– updateTeamInfos:teamId:completion: required method

Update the group profile

- (void)updateTeamInfos:(NSDictionary<NSNumber*,NSString*> *)values teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

values

group information key-value pair that needs to be updated

teamId

Group ID

completion

Completion callback

Discussion

Update the group profile

This interface can modify multiple attributes of a group at a time, such as name and announcement. The passed key-value pair is {@(NIMSuperTeamUpdateTag): NSString}, and invalid data will be filtered. The group owner and administrator can edit the data.

Declared In

NIMSuperTeamManagerProtocol.h

– applyToTeam:message:completion: required method

Request to join a group

- (void)applyToTeam:(NSString *)teamId message:(NSString *)message completion:(nullable NIMTeamApplyHandler)completion

Parameters

teamId

Group ID

message

request message

completion

Completion callback

Discussion

Request to join a group

Declared In

NIMSuperTeamManagerProtocol.h

– passApplyToTeam:userId:completion: required method

Approve the request to join a group

- (void)passApplyToTeam:(NSString *)teamId userId:(NSString *)userId completion:(nullable NIMTeamApplyHandler)completion

Parameters

teamId

Group ID

userId

ID of a requester

completion

Completion callback

Discussion

Approve the request to join a group

Declared In

NIMSuperTeamManagerProtocol.h

– rejectApplyToTeam:userId:rejectReason:completion: required method

Decline a request to join a group

- (void)rejectApplyToTeam:(NSString *)teamId userId:(NSString *)userId rejectReason:(NSString *)rejectReason completion:(nullable NIMTeamHandler)completion

Parameters

teamId

Group ID

userId

ID of a requester

rejectReason

reason for rejecting the request

completion

Completion callback

Discussion

Decline a request to join a group

Declared In

NIMSuperTeamManagerProtocol.h

– updateUserNick:newNick:inTeam:completion: required method

Update the nickname in a group

- (void)updateUserNick:(NSString *)userId newNick:(NSString *)newNick inTeam:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

userId

group member ID

newNick

new display nickname

teamId

Group ID

completion

Completion callback

Discussion

Update the nickname in a group

Declared In

NIMSuperTeamManagerProtocol.h

– updateMyCustomInfo:inTeam:completion: required method

Update custom settings of a group profile

- (void)updateMyCustomInfo:(NSString *)newInfo inTeam:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

newInfo

new custom attributes

teamId

Group ID

completion

Completion callback

Discussion

Update custom settings of a group profile

Declared In

NIMSuperTeamManagerProtocol.h

– addManagersToTeam:users:completion: required method

Add an administrator

- (void)addManagersToTeam:(NSString *)teamId users:(NSArray<NSString*> *)users completion:(nullable NIMTeamHandler)completion

Parameters

teamId

Group ID

users

list of user IDs to be added as administrator

completion

Completion callback

Discussion

Add an administrator

Declared In

NIMSuperTeamManagerProtocol.h

– removeManagersFromTeam:users:completion: required method

Revoke the administrator role from a member

- (void)removeManagersFromTeam:(NSString *)teamId users:(NSArray<NSString*> *)users completion:(nullable NIMTeamHandler)completion

Parameters

teamId

Group ID

users

list of user IDs to be revoked the administrator role

completion

Completion callback

Discussion

Revoke the administrator role from a member

Declared In

NIMSuperTeamManagerProtocol.h

– transferManagerWithTeam:newOwnerId:isLeave:completion: required method

Transfer the ownership of a group

- (void)transferManagerWithTeam:(NSString *)teamId newOwnerId:(NSString *)newOwnerId isLeave:(BOOL)isLeave completion:(nullable NIMTeamHandler)completion

Parameters

teamId

Group ID

newOwnerId

New group owner ID

isLeave

specify whether to leave the group if the ownership of a group is transferred.

completion

Completion callback

Discussion

Transfer the ownership of a group

Declared In

NIMSuperTeamManagerProtocol.h

– acceptInviteWithTeam:invitorId:completion: required method

Accept an invitation to join a group

- (void)acceptInviteWithTeam:(NSString *)teamId invitorId:(NSString *)invitorId completion:(nullable NIMTeamHandler)completion

Parameters

teamId

Group ID

invitorId

invitor ID

completion

Completion callback

Discussion

Accept an invitation to join a group

Declared In

NIMSuperTeamManagerProtocol.h

– rejectInviteWithTeam:invitorId:rejectReason:completion: required method

Reject an invite request

- (void)rejectInviteWithTeam:(NSString *)teamId invitorId:(NSString *)invitorId rejectReason:(NSString *)rejectReason completion:(nullable NIMTeamHandler)completion

Parameters

teamId

Group ID

invitorId

invitor ID

rejectReason

reason for rejecting the request

completion

Completion callback

Discussion

Reject an invite request

Declared In

NIMSuperTeamManagerProtocol.h

– updateNotifyState:inTeam:completion: required method

Update the state of a group notification

- (void)updateNotifyState:(NIMTeamNotifyState)state inTeam:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

state

group notification state

teamId

Group ID

completion

Completion callback

Discussion

Update the state of a group notification

Declared In

NIMSuperTeamManagerProtocol.h

– notifyStateForNewMsg: required method

The state of a group notification

- (NIMTeamNotifyState)notifyStateForNewMsg:(NSString *)teamId

Parameters

teamId

Group ID

Return Value

state

Discussion

The state of a group notification

Declared In

NIMSuperTeamManagerProtocol.h

– updateMuteState:userIds:inTeam:completion: required method

Mute a group member

- (void)updateMuteState:(BOOL)mute userIds:(NSArray<NSString*> *)userIds inTeam:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

mute

mute or unmute

userIds

user ID

teamId

Group ID

completion

Completion callback

Discussion

Mute a group member

If the operation is successful, CommsEase will send a group notification message for banning

Declared In

NIMSuperTeamManagerProtocol.h

– updateMuteState:inTeam:completion: required method

Mute all group members

- (void)updateMuteState:(BOOL)mute inTeam:(NSString *)teamId completion:(nullable NIMTeamHandler)completion

Parameters

mute

mute or unmute

teamId

Group ID

completion

Completion callback

Discussion

Mute all group members

If the operation is successful, CommsEase will send a group notification message for banning

Declared In

NIMSuperTeamManagerProtocol.h

– fetchTeamMembers:option:completion: required method

Get the members of a supergroup

- (void)fetchTeamMembers:(NSString *)teamId option:(NIMTeamFetchMemberOption *)option completion:(nullable NIMTeamMemberHandler)completion

Parameters

teamId

Group ID

completion

Completion callback

Discussion

Get the members of a supergroup

In most cases, the request is read from the local cache and returned synchronously. However, due to the large amount of information about group members, the SDK delays retrieving the information after login. Considering the network and other issues, the SDK may not cache the group member information in time, so this request will be an asynchronous operation (incremental request) with a network request. At the same time, this interface will request the data information of group users that are not cached locally, but will not trigger - (void)onUserInfoChanged: callback.

Declared In

NIMSuperTeamManagerProtocol.h

– fetchTeamMutedMembers:completion: required method

getting the list of muted the members in a group

- (void)fetchTeamMutedMembers:(NSString *)teamId completion:(nullable NIMTeamMemberHandler)completion

Parameters

teamId

Group ID

completion

Completion callback

Discussion

getting the list of muted the members in a group

In most cases, the request is read from the local cache and returned synchronously. However, due to the large amount of information about group members, the SDK delays retrieving the information after login. Considering the network and other issues, the SDK may not cache the group member information in time, so this request will be an asynchronous operation (incremental request) with a network request. At the same time, this interface will request the data information of group users that are not cached locally, but will not trigger - (void)onUserInfoChanged: callback.

Declared In

NIMSuperTeamManagerProtocol.h

– fetchTeamInfo:completion: required method

Get the group profile

- (void)fetchTeamInfo:(NSString *)teamId completion:(nullable NIMTeamFetchInfoHandler)completion

Parameters

teamId

Group ID

completion

Completion callback

Discussion

Get the group profile

Declared In

NIMSuperTeamManagerProtocol.h

– teamMember:inTeam: required method

Get a user profile of a group

- (nullable NIMTeamMember *)teamMember:(NSString *)userId inTeam:(NSString *)teamId

Parameters

userId

user ID

teamId

Group ID

Return Value

a user profile

Discussion

Get a user profile of a group

Returns the locally cached group member information, or return nil if there is no corresponding data locally.

Declared In

NIMSuperTeamManagerProtocol.h

– addDelegate: required method

Add a supergroup delegate

- (void)addDelegate:(id<NIMTeamManagerDelegate>)delegate

Parameters

delegate

group delegate

Discussion

Add a supergroup delegate

Declared In

NIMSuperTeamManagerProtocol.h

– removeDelegate: required method

Remove a supergroup delegate

- (void)removeDelegate:(id<NIMTeamManagerDelegate>)delegate

Parameters

delegate

group delegate

Discussion

Remove a supergroup delegate

Declared In

NIMSuperTeamManagerProtocol.h