浏览 SDKs · iOS
SDKsiOS商业版

接受通话

使用 iOS SDK 接受通话邀请。

复制

onReceiveNewInvitation: 取得完整 OIMSignalingInfo 后接受邀请:

[[OIMManager manager] signalingAccept:signalingInfo
                            onSuccess:^(OIMInvitationResultInfo * _Nullable credentials) {
    if (credentials != nil) [self joinMediaRoom:credentials];
}
                            onFailure:^(NSInteger code, NSString * _Nullable message) {
    [self showCallError:code message:message ?: @"接受邀请失败"];
}];

必须沿用收到的原始对象,不能重新生成 roomID。成功 callback 返回入会凭据;取得有效 tokenroomID 后再连接媒体引擎。