Integrate SDK
Prepare Environment
Before integrating the ZEGO Express SDK, please ensure your development environment meets the following requirements:
- Xcode 15.0 or later.
- A macOS device running macOS 10.13 or later.
- The macOS device is connected to the Internet.
Integrate SDK
(Optional) Create a new project
-
Launch Xcode, click "Create a new Xcode project" in the "Welcome to Xcode" window, or select "File > New > Project" from the menu. In the form that appears, select the macOS platform, and select "App" under "Application".

-
Fill out the form and select various options to configure your project, then click "Next".
You must provide "Product Name" and "Organization Identifier", which are used to create the unique identifier "Bundle Identifier" for the App.

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

Import SDK
Developers can integrate the SDK using any of the following methods.
Method 1: Use CocoaPods for automatic integration
-
Install CocoaPods. For common installation issues, please refer to CocoaPods FAQ - Installing CocoaPods.
-
Open Terminal, navigate to the project root directory, and run the
pod initcommand to create a Podfile. -
Open the Podfile and add
pod 'ZegoExpressAudio-macOS'under "target". You need to replace "MyProject" with your Target name.
- Since the SDK is an XCFramework, CocoaPods v1.10.0 or later is required to integrate this SDK.
- Starting from version v3.2.0, the Pod name for Express Real-time Audio/Video Video SDK changed from
ZegoExpressEngine/VideotoZegoExpressEngine-macOS; the Pod name for Express Real-time Voice Audio SDK changed fromZegoExpressEngine/AudiotoZegoExpressAudio-macOS.
target 'MyProject' do
use_frameworks!
# Please specify 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 'ZegoExpressAudio-macOS', '~> x.y.z'
end-
Run the
pod repo updatecommand 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 Documentation. -
Run the
pod installcommand to install the SDK.
- If you encounter the "CDN: trunk URL couldn't be downloaded" issue, please refer to CocoaPods FAQ - Unable to connect to trunk CDN.
- If you encounter the "Unable to find a specification for 'ZegoExpressEngine'" issue, please refer to CocoaPods FAQ - Unable to find project.
- If you encounter the "CocoaPods could not find compatible versions for pod "ZegoExpressEngine-macOS"" issue, please refer to CocoaPods FAQ - Unable to find project.
Method 2: Copy SDK files for manual integration
-
Please refer to Download SDK Package, download the latest version of the SDK and extract it.
-
Manually copy the SDK dynamic library file "ZegoExpressEngine.xcframework" to your project directory.
-
Open Xcode, select "File > Add Files to "xxx"" (xxx is the project name) menu, add the SDK library files to the project.

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

Set Permissions
Set the required permissions for the app according to actual application needs.
In Xcode, select "TARGETS > Signing & Capabilities > App Sandbox" menu, check the permissions required by the SDK.
Network - Incoming Connections (Server)Network - Outgoing Connections (Client)Hardware - Audio Input

