SDKsiOS
Invite users to a group
Invite users to an iOS group.
Group owners and administrators can manage members according to OpenIMServer permissions. The client can control action visibility from the current member's role, but the server still performs the final permission check.
[[OIMManager manager] inviteUserToGroup:groupID
reason:@"Join the project discussion"
usersID:@[targetUserID]
onSuccess:^(NSArray<OIMGroupInviteResult *> *results) {
[self handleInviteResults:results];
}
onFailure:^(NSInteger code, NSString *message) {
[self showErrorCode:code message:message];
}];Provide groupID, an invitation message, and an array of user IDs. A successful callback means that the server accepted the request; it does not mean that every user has become a member. After a user joins, merge onGroupMemberAdded:. For the complete member delegate setup, see Retrieve group members.
Was this page helpful?