MacOS - initSDK returns error code 5

Description
Receiving ZMVideoSDKErrors_Load_Module_Error after trying to initialize ZMVideoSDK.

Which macOS Video SDK version?
macOS 1.12.0

To Reproduce(If applicable)
Steps to reproduce the behavior:
Same as a previous post mentioned here recently.

I have:

  • re-signed the aomHost, capHost and CptHost apps to match my Xcode certificate
  • Add the same files as the sample project into the “Copy Files” step with Frameworks as the destination inside Build Phases
  • Match the “Link binary with libraries” items with the sample macOS project
  • Verify the correct search paths for Frameworks and Libraries in Build settings
  • Match the items inside the “Frameworks, libraries, and embedded content” section under General.

Creating this topic since the previous one closed due to inactivity

I’m able to run the sample macOS project and use my JWT token to connect several devices to a video session. I’m struggling right now trying to start a new swift and swiftUI project with the macOS ZoomVideoSDK

Does anyone have a recent Xcode project/template that has successfully integrated the latest macOS ZMVideoSDK release? The documentation needs some updating, or at least it does not match what’s presented in the sample project.

@richardpiazza were you able to get your macOS project running?

@Jacs Yes, I was able to get my works app running on macOS with version 1.12.0.

I just threw together a GitHub repo that has an example project which builds and runs with all of the SDK binaries & bundles. I can add more to this over time to show some of the specifics of the SwiftUI integration if needed.

@richardpiazza Thank you so much for the template! I believe your GitHub repo will be helpful for a lot of people, since the current documentation is not ideal.

I was able to resign the apps, run the project and successfully initialize the zoom SDK using the following code:

func initializeSDK() {
        let initParams = ZMVideoSDKInitParams()
        initParams.domain = "https://zoom.us"
        initParams.enableLog = true
        initParams.logFilePrefix = "ZoomSDK"
        initParams.videoRawDataMemoryMode = ZMVideoSDKRawDataMemoryMode_Heap
        initParams.shareRawDataMemoryMode = ZMVideoSDKRawDataMemoryMode_Heap
        let sdkInitReturnStatus = ZMVideoSDK.shared().initialize(initParams)
        print("\(errorMessage(for: sdkInitReturnStatus)) ")
    }

    private func errorMessage(for error: ZMVideoSDKErrors) -> String {
        switch error {
            case ZMVideoSDKErrors_Success:
                return "SDK initialized successfully"
            case ZMVideoSDKErrors_Wrong_Usage:
                return "Error: Wrong usage of the SDK"
            case ZMVideoSDKErrors_Internal_Error:
                return "Error: Internal SDK error"
            case ZMVideoSDKErrors_Uninitialize:
                return "Error: SDK not initialized"
            case ZMVideoSDKErrors_Memory_Error:
                return "Error: Memory issues encountered"
            case ZMVideoSDKErrors_Load_Module_Error:
                return "Error: Failed to load a module"
            case ZMVideoSDKErrors_UnLoad_Module_Error:
                return "Error: Failed to unload a module"
            case ZMVideoSDKErrors_Auth_Error:
                return "Error: Authentication failed"
            case ZMVideoSDKErrors_JoinSession_NoSessionName:
                return "Error: No session name provided for joining session"
            case ZMVideoSDKErrors_Wrong_Usage:
                return "Error: Wrong Usage"
            case ZMVideoSDKErrors_Internal_Error:
                return "Error: Internal Error"
            case ZMVideoSDKErrors_Uninitialize:
                return "Error: Uninitialize"
            case ZMVideoSDKErrors_Memory_Error:
                return "Error: Memory Error"
            case ZMVideoSDKErrors_Load_Module_Error:
                return "Error: Load Module Error"
            case ZMVideoSDKErrors_UnLoad_Module_Error:
                return "Error: Unload Module Error"
            case ZMVideoSDKErrors_Invalid_Parameter:
                return "Error: Invalid Parameter"
            case ZMVideoSDKErrors_Call_Too_Frequently:
                return "Error: Call too frequently"
            case ZMVideoSDKErrors_No_Impl :
                return "Error: No impl"
            case ZMVideoSDKErrors_Dont_Support_Feature:
                return "Error: Dont support feature"
            case ZMVideoSDKErrors_Unknown:
                return "Error: Unkown"
            case ZMVideoSDKErrors_Remove_Folder_Fail:
                return "Remove Folder Fail"
             // Add additional cases for other specific errors...
            default:
                return "Unknown error occurred with code: \(error.rawValue)"
        }
    }

Would it be too much to ask for the order of steps in which you added the ZoomSDK dependencies to get the sample GitHub project to a working state?

For example :

  1. Copy ZoomVideoSDK Folder to your project directory, run the resign.zoom.zh script after adding your developer certificate
  2. Go to Build phases and generate a “new copy file phase” with destination pointing to Frameworks and add the 33 files mentioned there.
  3. etc

I would like to be able to create one from scratch myself, if possible

Great to hear @Jacs!

I’ve update that repo with step by step instructions in the readme, as well as altered the commit history to reflect each of the steps/changes applied.

Hope this helps!

1 Like

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