Browse SDKs · iOS
Platform
SDKsiOSEnterprise

Start a group call

Start a group audio or video call with the OpenIM iOS SDK.

Copy

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

ParameterTypeRequiredDescription
inviteeUserIDListNSArray<NSString *> *YesList of target group member user IDs to invite.
groupIDNSString *YesTarget group identifier. Must not be empty.
roomIDNSString *YesRoom identifier. You can pass the groupID or a uniquely assigned business room ID.
timeoutNSIntegerYesInvitation timeout duration in seconds.
mediaTypeNSString *YesMedia 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 with userID to maintain participant states. If your application provides custom room IDs, ensure all clients utilize the identical roomID.
  • Remote event notification: Selected group members receive invitations via onReceiveNewInvitation: in OIMSignalingListener.
  • Participant updates: Track group member responses via onInviteeAccepted: and onInviteeRejected:, updating active member rosters accordingly (see Handle call events).