logo
On this page

Integrating SDK

2026-03-05

Prepare Environment

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

  • Xcode 15.0 or above.
  • iOS 12.0 or above iOS devices that support audio and video.
  • The iOS device is connected to the Internet.

Integrate SDK

(Optional) Create new project

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

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

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

    You 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 implement SDK integration through any of the following methods.

  1. Open Xcode, select "File > Add Packages..." in the menu bar, and in the "Search or Enter Package URL" input box of the "Apple Swift Packages" popup, fill in the following URL and press Enter to confirm:

    https://github.com/zegolibrary/express-video-ios
  2. In "Dependency Rule", specify the SDK version you want to integrate (it is recommended to use the default "Up to Next Major Version"), then click "Add Package" to import the SDK. You can also refer to Apple Official Documentation for settings.

Method 2: Use CocoaPods for automatic integration

  1. Install CocoaPods. For common problems during installation, please refer to CocoaPods Common Questions - Installing CocoaPods.

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

  3. Open the Podfile file and add pod 'ZegoExpressEngine' under "target". You need to replace "MyProject" with the developer's 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 the Express Real-time Audio and Video Video SDK changed from ZegoExpressEngine/Video to ZegoExpressEngine; the Pod name of the Express Real-time Voice Audio SDK changed from ZegoExpressEngine/Audio to ZegoExpressAudio.
    target 'MyProject' do
        use_frameworks!
        # Please fill in the specific SDK version number
        # Please check the SDK latest version from the release notes, and modify x.y.z to the specific version number
        pod 'ZegoExpressEngine', '~> x.y.z'
    end
  4. Execute 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 Download SDK Package.

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

    Note

Method 3: Copy SDK files for manual integration

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

  2. Manually copy the SDK dynamic library file "ZegoExpressEngine.xcframework" to the developer's project directory.

    XCFramework is a new encapsulation form that includes multi-platform architectures such as real devices and simulators at the same time. Please integrate it as a whole into the project. It is not recommended to split it for use. However, if you really only need to integrate the real device architecture alone, or integrate the simulator architecture alone, you can also extract the .framework inside XCFramework for use alone.

    • ios-arm64: Suitable for iOS real devices.
    • ios-arm64_x86_64-maccatalyst: Suitable for Mac Catalyst packages on macOS. Mac Catalyst is a new framework launched by Apple in 2019, namely UIKit for Mac, aiming to run iPad Apps on macOS. For details, please refer to Apple Developer - Mac Catalyst
    • ios-arm64_x86_64-simulator: Suitable for iOS simulators.
  3. Open Xcode, select the "File > Add Files to "xxx" (xxx is the project name)" menu, and add the SDK library files 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.

  1. In Xcode, select the "TARGETS > Info > Custom iOS Target Properties" menu.

  2. Click the "+" add button to add camera and microphone permissions.

    • Privacy - Camera Usage Description

    • Privacy - Microphone Usage Description

2024-05-06

Previous

Example Source Code Running Guide

Next

Implement Video Call