# Unable to join meeting in iOS SwiftUI app

**URL:** <https://devforum.zoom.us/t/unable-to-join-meeting-in-ios-swiftui-app/103065>\
**Category:** iOS\
**Created:** [February 2, 2024, 10:09am UTC](https://devforum.zoom.us/t/unable-to-join-meeting-in-ios-swiftui-app/103065 "2024-02-02T10:09:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![santanu.agarwal](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/santanu.agarwal/32/49425_2.png) [@santanu.agarwal](https://devforum.zoom.us/u/santanu.agarwal)\
**Post date:** [February 2, 2024, 10:09am UTC](https://devforum.zoom.us/t/unable-to-join-meeting-in-ios-swiftui-app/103065/1 "2024-02-02T10:09:41Z")

</div>

I have imported the Zoom meeting SDK v5.17.6.13115 in my SwiftUI app.  
I am facing an issue in this while trying to join a meeting.  
Below is my code snippet -

```auto
class VideoViewController: UIViewController, MobileRTCAuthDelegate, MobileRTCMeetingServiceDelegate {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        askPermissionsForCameraFeed()
    }
    
    func askPermissionsForCameraFeed() {
        AVCaptureDevice.requestAccess(for: AVMediaType.video) { response in
            if response {
                //access granted
                self.getMainWindowToShareWithAppDelegate()
            } else {
                print("access not granted")
            }
        }
    }
    
    func getMainWindowToShareWithAppDelegate(){
        DispatchQueue.main.async {
            let scene = UIApplication.shared.connectedScenes.first
            let windowSceneDelegate = scene?.delegate as? UIWindowSceneDelegate
            let window = (windowSceneDelegate?.window)!
            UIApplication.shared.delegate = AppDelegate.Shared
            let delegate = UIApplication.shared.delegate as! AppDelegate
            delegate.window = window
            print("finding window to provide to zoom sdk")
            self.authenticateMobileRTCWith(jwt: "jwt_token")
        }
    }
    
    func authenticateMobileRTCWith(jwt: String) {
        if let authService = MobileRTC.shared().getAuthService() {
            authService.jwtToken = jwt
            authService.delegate = self
            authService.sdkAuth()
        }
    }
    
    func joinMeeting(meetingNumber: String) {
        if let meetingService = MobileRTC.shared().getMeetingService() {
            meetingService.delegate = self
            let joinMeetingParameters = MobileRTCMeetingJoinParam()
            joinMeetingParameters.meetingNumber = meetingNumber
            joinMeetingParameters.password = "password"
            meetingService.joinMeeting(with: joinMeetingParameters)
        }
    }
    
    func onMobileRTCAuthReturn(_ returnValue: MobileRTCAuthError) {
        switch returnValue {
        case .success:
            print("SDK successfully initialized.")
            joinMeeting(meetingNumber: "meeting_no")
        case .tokenWrong:
            print("SDK JWT is not valid.")
            presentJoinMeetingAlert(errMsg: "Wrong SDK authentication token")
        default:
            print("SDK Authorization failed with MobileRTCAuthError: \(returnValue).")
            presentJoinMeetingAlert(errMsg: "SDK Authorization failed: \(returnValue).")
        }
    }
    
    func presentJoinMeetingAlert(errMsg: String) {
        let alertController = UIAlertController(title: "Join meeting", message: errMsg, preferredStyle: .alert)
        let cancelAction = UIAlertAction(title: "Ok", style: .default, handler: { (action : UIAlertAction!) -> Void in })
        alertController.addAction(cancelAction)
        self.present(alertController, animated: true, completion: nil)
    }
    
    func onMeetingError(_ error: MobileRTCMeetError, message: String?) {
        print("Could not join or start meeting with MobileRTCMeetError: \(error) \(message ?? "")")
        presentJoinMeetingAlert(errMsg: message ?? "Could not join meeting due to some unknown reason.")
    }
    
    // Is called when the user joins a meeting.
    func onJoinMeetingConfirmed() {
        print("Join meeting confirmed.")
    }
    
    // Is called upon meeting state changes.
    func onMeetingStateChange(_ state: MobileRTCMeetingState) {
        print("Current meeting state: \(state)")
    }
}

```

I am getting the following error in my console -  
_" Could not join or start meeting with MobileRTCMeetError: MobileRTCMeetError(rawValue: 8) the meeting does not exist"._

Any idea how can I fix this issue ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 3, 2024, 8:09pm UTC](https://devforum.zoom.us/t/unable-to-join-meeting-in-ios-swiftui-app/103065/2 "2024-03-03T20:09:46Z")

</div>

Closed on March 3, 2024, 8:09pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
