logo
Video Call
On this page

Integration SDK

2024-05-06

Prepare Environment

Before starting to integrate ZEGO Express SDK, please ensure the development environment meets the following requirements:

  • Xcode 15.0 or above.
  • macOS device with macOS 10.13 or above.
  • macOS device is connected to the Internet.

Integration SDK

(Optional) Create New Project

  1. Launch Xcode, click "Create a new Xcode project" in the "Welcome to Xcode" window, or select the "File > New > Project" menu.

  2. In the form that appears, select the macOS platform, and select "App" under "Application".

  3. Fill out the form and select various options to configure the project. After completion, click "Next".

    Warning

    Must provide "Product Name" and "Organization Identifier", which are used to create the App's unique identifier "Bundle Identifier".

  4. Select the project storage path and click "Create" to create the project.

Import SDK

Developers can achieve SDK integration through any of the following methods.

Method 1: Automatic Integration Using CocoaPods

  1. Install CocoaPods. If you encounter problems during installation, please refer to CocoaPods Common Questions - Installing CocoaPods.

  2. Open Terminal, navigate to the project root directory, and run the pod init command to create a Podfile file.

  3. Open the Podfile file and add pod 'ZegoExpressEngine-macOS' under "target". You need to replace "MyProject" with your Target name.

    Warning
    • Since the SDK is an XCFramework, CocoaPods v1.10.0 or above is required to integrate this SDK.
    • Starting from version v3.2.0, the Pod name of Express Real-time Audio/Video Video SDK changed from ZegoExpressEngine/Video to ZegoExpressEngine-macOS; the Pod name of Express Real-time Audio Audio SDK changed from ZegoExpressEngine/Audio to ZegoExpressAudio-macOS.
    target 'MyProject' do
        use_frameworks!
        # Please fill in the specific SDK version number
        # Please check the latest SDK version from the release notes and modify x.y.z to the specific version number
        pod 'ZegoExpressEngine-macOS', '~> x.y.z'
    end
  4. Run the pod repo update command to update the local index to ensure the latest version of the SDK can be installed. For the latest version number, please refer to the release history in the Download Document.

  5. Run the pod install command to install the SDK.

    Note

Method 2: Manual Integration by Copying SDK Files

  1. Please refer to the Download document to download the latest version of the SDK and extract it.

  2. Manually copy the SDK dynamic library file "ZegoExpressEngine.xcframework" to your project directory.

  3. Open Xcode, select the "File > Add Files to "xxx" (xxx is the project name)" menu, and add the SDK library file to the project.

  4. Select the "TARGETS > General > Frameworks,Libraries,and Embedded Content" menu, add "ZegoExpressEngine.xcframework", and set "Embed" to "Embed & Sign".

Set Permissions

Set the permissions required by the application according to actual application needs.

In Xcode, select the "TARGETS > Signing & Capabilities > App Sandbox" menu and check the permissions required by the SDK.

  • Network - Incoming Connections (Server)
  • Network - Outgoing Connections (Client)
  • Hardware - Camera
  • Hardware - Audio Input

How to reduce the App size of integrating Native SDK?

Previous

Running Example Source Code

Next

Implement Video Call

On this page

Back to top