SDKsiOSEnterprise
Start a group call
Start a group audio or video call with the OpenIM iOS SDK.
Initiate a multi-party group audio or video call using signalingInviteInGroup:offlinePushInfo:onSuccess:onFailure:. The SDK dispatches invitations solely to members explicitly enumerated in inviteeUserIDList, rather than automatically inviting all members in the group.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
inviteeUserIDList | NSArray<NSString *> * | Yes | List of target group member user IDs to invite. |
groupID | NSString * | Yes | Target group identifier. Must not be empty. |
roomID | NSString * | Yes | Room identifier. You can pass the groupID or a uniquely assigned business room ID. |
timeout | NSInteger | Yes | Invitation timeout duration in seconds. |
mediaType | NSString * | Yes | Media stream format: @"video" or @"audio". |
Code example
OIMInvitationInfo *invitation = [OIMInvitationInfo new];
invitation.inviteeUserIDList = selectedGroupMemberIDs;
invitation.groupID = groupID;
invitation.roomID = groupID;
invitation.timeout = 30;
invitation.mediaType = @"video";
[[OIMManager manager] signalingInviteInGroup:invitation
offlinePushInfo:nil
onSuccess:^(OIMInvitationResultInfo * _Nullable credentials) {
if (credentials != nil) {
[self joinMediaRoom:credentials];
}
}
onFailure:^(NSInteger code, NSString * _Nullable message) {
[self showCallError:code message:message ?: @"Failed to initiate group call"];
}];Return value
The onSuccess callback delivers an OIMInvitationResultInfo instance containing the confirmed roomID, media token, liveURL, and busy user list (busyLineUserIDList). Entries in busyLineUserIDList indicate that specific members are engaged in other calls; this does not abort invitations destined for available members.
State changes after the call
- Local state merge: Merge call state by
roomID, combining withuserIDto maintain participant states. If your application provides custom room IDs, ensure all clients utilize the identicalroomID. - Remote event notification: Selected group members receive invitations via
onReceiveNewInvitation:inOIMSignalingListener. - Participant updates: Track group member responses via
onInviteeAccepted:andonInviteeRejected:, updating active member rosters accordingly (see Handle call events).
Was this page helpful?