# MacOS - initSDK returns error code 5

**URL:** https://devforum.zoom.us/t/macos-initsdk-returns-error-code-5/113887
**Category:** macOS
**Tags:** video-sdk
**Created:** [July 18, 2024, 3:11am UTC](https://devforum.zoom.us/t/macos-initsdk-returns-error-code-5/113887 "2024-07-18T03:11:52Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Jacs](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jacs](https://devforum.zoom.us/u/Jacs)
#### Post date: [July 18, 2024, 3:11am UTC](https://devforum.zoom.us/t/macos-initsdk-returns-error-code-5/113887/1 "2024-07-18T03:11:52Z")

</div>

**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](https://devforum.zoom.us/t/macos-initsdk-is-giving-error-code-5/111280) 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

---

<div class="post-metadata">

### Author: ![Jacs](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jacs](https://devforum.zoom.us/u/Jacs)
#### Post date: [July 18, 2024, 3:57am UTC](https://devforum.zoom.us/t/macos-initsdk-returns-error-code-5/113887/2 "2024-07-18T03:57:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Jacs](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jacs](https://devforum.zoom.us/u/Jacs)
#### Post date: [July 18, 2024, 4:02am UTC](https://devforum.zoom.us/t/macos-initsdk-returns-error-code-5/113887/3 "2024-07-18T04:02:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![richardpiazza](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/richardpiazza/32/58829_2.png) [@richardpiazza](https://devforum.zoom.us/u/richardpiazza)
#### Post date: [July 18, 2024, 2:36pm UTC](https://devforum.zoom.us/t/macos-initsdk-returns-error-code-5/113887/4 "2024-07-18T14:36:24Z")

</div>

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

I just threw together a [GitHub](https://github.com/richardpiazza/zoom-swiftui-example) 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.

---

<div class="post-metadata">

### Author: ![Jacs](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jacs](https://devforum.zoom.us/u/Jacs)
#### Post date: [July 18, 2024, 3:16pm UTC](https://devforum.zoom.us/t/macos-initsdk-returns-error-code-5/113887/5 "2024-07-18T15:16:18Z")

</div>

@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:

```auto
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

---

<div class="post-metadata">

### Author: ![richardpiazza](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/richardpiazza/32/58829_2.png) [@richardpiazza](https://devforum.zoom.us/u/richardpiazza)
#### Post date: [July 18, 2024, 4:33pm UTC](https://devforum.zoom.us/t/macos-initsdk-returns-error-code-5/113887/6 "2024-07-18T16:33:10Z")

</div>

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!

---

<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: [August 18, 2024, 2:33am UTC](https://devforum.zoom.us/t/macos-initsdk-returns-error-code-5/113887/7 "2024-08-18T02:33:28Z")

</div>

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