Unable to leave me when waiting for meeting room

I am trying to leave meeting programmatically when confirmed meeting is called 3 time , when call is not connected the onConfirmedMeeting is called again and again that’s why i am putting my logic here

    func onJoinMeetingConfirmed() {
        if numberOfRetry > 2
            if let meetingSesrvice = MobileRTC.shared()?.getMeetingService()
                 meetingSesrvice.leaveMeeting(with: LeaveMeetingCmd_Leave)
                 numberOfRetry = 0
        numberOfRetry += 1
        print("onJoinMeetingConfirmed : ------->")

Which version?

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Don’t start meeting from Zoom host
  2. start call from mobile app , it will open a meeting room
  3. Then i try to leave meeting using code not from ui


Smartphone (please complete the following information):

  • Device: iPhone6
  • OS: [e.g. iOS12.3.1

Additional context
Our requirement is to automatically leave meeting using code , if user stay 1 min in waiting room , please help

Hi dhiraj,

Thanks for the post. If you would like to leave meeting programmatically while in the waiting room, you may use the following steps:

  1. Implement the callback onJBHWaitingWithCmd(https://zoom.github.io/zoom-sdk-ios/protocol_mobile_r_t_c_meeting_service_delegate_01-p.html#a61e8ce71f1fd6fe00728eec699fe4873), when the user enters this room, this callback will be triggered. You may also customized this waiting room, we have this implementation in our demo app:https://github.com/zoom/zoom-sdk-ios/blob/0da49375fdc8bebf412e07413d6d1264281ade54/MobileRTCSample/MobileRTCSample/MainViewController%2BMeetingDelegate.m#L172
  2. Set a timer after a period, and then call leaveMeetingWithCmd to leave the meeting programmatically:https://zoom.github.io/zoom-sdk-ios/interface_mobile_r_t_c_meeting_service.html#a7954c7ceb9ea39742f1e3bbdb7ce93e4

For normal usage, even if the host starts the meeting while the participant is in the waiting room, there is a latency for the participants to actually enter the meeting.

Hope this helps.