cancel
Showing results for 
Search instead for 
Did you mean: 

SDK failed to initialize with error code: ZoomVideoSDKError(rawValue: 1)

rutika11
Newcomer
Newcomer
- Xcode Version: 15.0.1
- Device
: iPhone XR / iOS 17.3.1
- SetUp
: I have integrated the Zoom Video SDK using Swift Package Manager from https://github.com/zoom/videosdk-ui-toolkit-ios repository (using the master branch) with my custom UI.

- Current State :- After migrating from Twilio to Zoom, I have successfully set up the backend and integrated everything, and video calls are functioning properly.

- Issue Faced :- Upon creating the video call request for the first time after the app launch, subsequent attempts to request a call with either the same or a different token and session name result in an error with ZoomVideoSDKError(rawValue: 1). I suspect this could be an initialization issue, as upon fresh app launch, the first-time video call connects successfully without any issues.

- Details :- To initialize the Zoom Meeting params, I use the following method every time a user starts a video call:

``func setUpZoomMetting() {

        debugPrint("call View Didload")

        initZoomParams.domain = "https://zoom.us"

        initZoomParams.enableLog = true

        

        let sdkInitReturnStatus = ZoomVideoSDK.shareInstance()?.initialize(initZoomParams)

        switch sdkInitReturnStatus {

        case .Errors_Success:

            debugPrint(" *** SDK initialized successfully")

            ZoomVideoSDK.shareInstance()?.delegate = self

            assignTokenAndDetailForJoinSession()

        default:

            if let error = sdkInitReturnStatus {

                debugPrint("*** SDK failed to initialize: \(error)")

            }

        }

    }``


----- And here's how I assign received token and session detail, obtained from the API ----
 

``func assignTokenAndDetailForJoinSession() {

        let sessionContext = ZoomVideoSDKSessionContext()

        sessionContext.token = zoomSessionToken

        sessionContext.sessionName = zoomSessionName

        sessionContext.userName = zoomUserName

        

        if let session = ZoomVideoSDK.shareInstance()?.joinSession(sessionContext) {

            debugPrint("Session joined successfully.")

            startPreview()

        } else {

            debugPrint("joinSession: failed.")

        }

    }``

 

 - Request :- I require your insights or assistance in identifying and resolving this initialization issue. For reference, I have attached the relevant codebase.

1 REPLY 1

Bort
Community Champion | Employee
Community Champion | Employee

Hi @rutika11 

This question would be better suited for the Zoom Developer's Forum, a dedicated forum for API, SDK, and other developer's questions. That forum can be found here: https://devforum.zoom.us/