NIMTeamManager Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | NIMTeamManagerProtocol.h |
– allMyTeams
required method
Get all groups
- (nullable NSArray<NIMTeam*> *)allMyTeams
Return Value
list of all groups
Discussion
Get all groups
Declared In
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.h
– createTeam:users:completion:
required method
Create a group
- (void)createTeam:(NIMCreateTeamOption *)option users:(NSArray<NSString*> *)users completion:(nullable NIMTeamCreateHandler)completion
Parameters
option |
options for creating a group |
---|---|
users |
user accid list |
completion |
Completion callback |
Discussion
Create a group
Declared In
NIMTeamManagerProtocol.h
– dismissTeam:completion:
required method
Dismiss a group
- (void)dismissTeam:(NSString *)teamId completion:(nullable NIMTeamHandler)completion
Parameters
teamId |
Group ID |
---|---|
completion |
Completion callback |
Discussion
Dismiss a group
Declared In
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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 |
postscript |
additional message for invitation |
attach |
extended message |
completion |
Completion callback |
Discussion
Send an invite request
Declared In
NIMTeamManagerProtocol.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
Declared In
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.h
– updateTeamInviteMode:teamId:completion:
required method
Update the invitation mode
- (void)updateTeamInviteMode:(NIMTeamInviteMode)inviteMode teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion
Parameters
inviteMode |
invitation mode |
---|---|
teamId |
Group ID |
completion |
Completion callback |
Discussion
Update the invitation mode
Declared In
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.h
– updateTeamUpdateInfoMode:teamId:completion:
required method
Permissions to update a group profile
- (void)updateTeamUpdateInfoMode:(NIMTeamUpdateInfoMode)updateInfoMode teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion
Parameters
updateInfoMode |
Update the permissions to edit the group profile |
---|---|
teamId |
Group ID |
completion |
Completion callback |
Discussion
Permissions to update a group profile
Declared In
NIMTeamManagerProtocol.h
– updateTeamUpdateClientCustomMode:teamId:completion:
required method
Permissions to update a custom field of a group profile
- (void)updateTeamUpdateClientCustomMode:(NIMTeamUpdateClientCustomMode)clientCustomMode teamId:(NSString *)teamId completion:(nullable NIMTeamHandler)completion
Parameters
teamId |
Group ID |
---|---|
completion |
Completion callback |
updateInfoMode |
Update the permissions to edit the group profile |
Discussion
Permissions to update a custom field of a group profile
Declared In
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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 {@(NIMTeamUpdateTag) : NSString}, and invalid data will be filtered data.
Declared In
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.h
– updateMuteState:userId:inTeam:completion:
required method
Mute a group member
- (void)updateMuteState:(BOOL)mute userId:(NSString *)userId inTeam:(NSString *)teamId completion:(nullable NIMTeamHandler)completion
Parameters
mute |
mute or unmute |
---|---|
userId |
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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.h
– fetchTeamMembers:completion:
required method
Get the members of a group
- (void)fetchTeamMembers:(NSString *)teamId completion:(nullable NIMTeamMemberHandler)completion
Parameters
teamId |
Group ID |
---|---|
completion |
Completion callback |
Discussion
Get the members of 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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.h
– fetchTeamMembersFromServer:completion:
required method
Get group members by sending a network request *
- (void)fetchTeamMembersFromServer:(NSString *)teamId completion:(nullable NIMTeamMemberHandler)completion
Parameters
teamId |
Group ID |
---|---|
completion |
Completion callback |
Discussion
Get group members by sending a network request *
The interface is used to get the list of group members by calling a network request, which is different from fetchTeamMembers:completion. This interface is an asynchronous operation (incremental request) that must have 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
NIMTeamManagerProtocol.h
– fetchInviterAccids:withTargetMembers:completion:
required method
Get the accid of an inviter
- (void)fetchInviterAccids:(NSString *)teamID withTargetMembers:(NSArray<NSString*> *)memberIDs completion:(nullable NIMTeamFetchInviterAccidsHandler)completion
Parameters
memberIDs |
member Ids to be queried. The number is not allowed to be greater than 200 |
---|---|
completion |
Completion callback |
teamId |
Group ID |
Discussion
Get the accid of an inviter
Declared In
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.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
NIMTeamManagerProtocol.h
– searchTeamWithOption:completion:
required method
Query a group profile
- (void)searchTeamWithOption:(NIMTeamSearchOption *)option completion:(NIMTeamSearchHandler)completion
Parameters
option |
query option |
---|---|
completion |
Completion callback |
Discussion
Query a group profile
Returns the locally cached group member information, or return nil if there is no corresponding data locally.
Declared In
NIMTeamManagerProtocol.h
– updateTInfosLocal:
required method
Update the local group profile
- (BOOL)updateTInfosLocal:(NSArray<NIMTeam*> *)teams
Parameters
teams |
group profile to be updated |
---|
Discussion
Update the local group profile
This interface is used to modify the local group information and will not be synchronized to the server.
Declared In
NIMTeamManagerProtocol.h
– fetchTeamsWithTimestamp:completion:
required method
Get all group profiles
- (void)fetchTeamsWithTimestamp:(NSTimeInterval)timestamp completion:(nullable NIMTeamFetchTeamsHandler)block
Parameters
timestamp |
0 indicates full access to group information. |
---|---|
block |
Completion callback |
Discussion
Get all group profiles
get full group information from the server and persists the data locally
Declared In
NIMTeamManagerProtocol.h
– fetchTeamInfoList:completion:
required method
Get the group profiles with specified group IDs
- (void)fetchTeamInfoList:(NSArray<NSString*> *)teamIds completion:(NIMTeamFetchTeamInfoListHandler)block
Parameters
teamIds |
list of group IDs. If more than 10 IDs are returned, take the first 10 IDs. |
---|---|
block |
Completion callback |
Discussion
Get the group profiles with specified group IDs
get full group information from the server and do not persist the data locally
Declared In
NIMTeamManagerProtocol.h
– addDelegate:
required method
Add a group delegate
- (void)addDelegate:(id<NIMTeamManagerDelegate>)delegate
Parameters
delegate |
group delegate |
---|
Discussion
Add a group delegate
Declared In
NIMTeamManagerProtocol.h
– removeDelegate:
required method
Remove a group delegate
- (void)removeDelegate:(id<NIMTeamManagerDelegate>)delegate
Parameters
delegate |
group delegate |
---|
Discussion
Remove a group delegate
Declared In
NIMTeamManagerProtocol.h