- SDK Downloads
- Sample Codes
- Quick Starts
- Common Features
- Advanced Streaming
- Advanced Video Processing
- Advanced Audio Processing
- Best Practices
- Error Codes
- API Documents
- API Documents
- Function overview
Integrate the SDK
1 Set up the development environment
Before integrating the ZEGO Express SDK, make sure the development environment meets the following requirements:
- Xcode 5.0 or later
- An iOS device or iOS Simulator that is running on iOS 7.0 or later and supports audio and video. We recommend you use a real device.
- The iOS device is connected to the internet.
2 Integrate the SDK
2.1 Optional: Create a new project
If you are integrating the SDK to an existing project, skip this step.
- Open Xcode, and in the Welcome to Xcode window, click Create a new Xcode project or select File > New > Project. In the dialog that appears, select the iOS tab, then select App in the Application section.
- Fill in items or choose options for the new project, click Next after configuration is completed.
Product Name and Organization Identifier are required, which will be used for creating the App UID - Bundle Identifier.
- Choose a particular directory to restore the project to be created, and click Create to create a project.
2.2 Import the SDK
Choose either of the following methods to integrate the ZEGO Express SDK into your project.
Method 1: Integrate the SDK automatically with CocoaPods
Install CocoaPods. For more details, see CocoaPods Installation Guide .
Terminalwindow, enter the root directory of the project, and execute the command
pod initto create a
pod 'ZegoExpressEngine/Video', and change
MyProjectto your target name. If the SDK with WhiteBoard feature is needed, execute the command:
We no longer provide SDKs for different languages since version 1.11.0. If you currently use
pod 'ZegoExpressEngine/Video_zh, change it to
pod 'ZegoExpressEngine/Video'when you upgrade to the new version.
target 'MyProject' do use_frameworks! pod 'ZegoExpressEngine/Video' end
pod repo updateto update the local index to make sure the latest version of SDK can be installed. For the latest version number, see ZEGO Express-Video iOS SDK Release History .
pod installto install the SDK.
For common problems you may encounter when using CocoaPods, see CocoaPods FAQ .
Method 2: Manually add the SDK to the project
- Download the latest version of SDK from SDK Downloads . We recommend you use XCFramework, and then extract files from the downloaded SDK package.
Zego's website provides two different packaging types of SDK, XCFramework and traditional Framework.
The downloaded XCFramework package contains SDKs for iOS + iOS (Simulator) + macOS, which is recommended.
There are two folders in the downloaded package of the traditional Framework:
armv7-arm64-x86_64. The differences are as follows:
armv7-arm64is only used for debugging on real devices. You need to use the
ZegoExpressEngine.frameworkunder this folder in the final release; otherwise, they may be called back by Apple.
armv7-arm64-x86_64contains libraries for debugging on real devices and simulators. If you use the simulator to debug during the development process, you need to import the
ZegoExpressEngine.frameworkunder this folder. But when comes to the final release, switch back to the framework under the
armv7-arm64folder. Note: This library may encounter compilation issues after Xcode 12.3. For more information, see FAQ-2 in chapter 4.
Select a framework package file that meets the development requirements and copy the SDK dynamic library file
ZegoExpressEngine.frameworkto the project directory.
Open Xcode and select File > Add Files to "xxx" (xxx is the project name) to add the SDK dynamic library files to the project.
- Do the following to add the framework file to the project target.
a) Select the project target.
b) Click General, then under Frameworks, Libraries, and Embedded Content, click the Add button (+) below the table.
c) Add ZegoExpressEngine.framework to the target, and set the Embed field to Embed & Sign.
3 Add permissions
Permissions can be set as needed.
- Open Xcode, select the target object, and then click Info > Custom iOS Target Properties.
- Click the Add button (+) to add camera and microphone permissions.
Privacy-Camera Usage Description
Privacy-Microphone Usage Description
The error occurs when packaging the app: Failed to verify bitcode in ZegoExpressEngine.framework/ZegoExpressEngine.
a. Check whether the Xcode version is too low. We recommend updating the latest Xcode version.
b. If you have to use the old version of Xcode for packaging, find the Enable Bitcode option in the project's Build Setting and set it to NO, and open the
cd DIRECTORYto go to the directory where ZegoExpressEngine.framework is stored in your project, and then execute the following command to remove the bitcode in the SDK：
xcrun bitcode_strip ZegoExpressEngine.framework/ZegoExpressEngine -r -o ZegoExpressEngine.framework/ZegoExpressEngine
The message shows when running the App: Building for iOS Simulator, but the linked and embedded framework'ZegoExpressEngine.framework' was built for iOS + iOS Simulator.
In Xcode 12.3 or later, the framework with iOS + iOS (Simulator) dual-platform architecture is prohibited by default. We recommend downloading with XCFramework recommended by Apple (you can choose to download XCFramework in the drop-down box in SDK Downloads ).
Or you can select the project target, and then click Build Settings > Validate Workspace in Xcode and set the parameter to YES to continue using the traditional framework.