- SDK Downloads
- Sample Codes
- Quick Starts
- Common Features
- Advanced Streaming
- Advanced Video Processing
- Advanced Audio Processing
- Best Practices
- Error Codes
- API Documents
- API Documents
Integrating the SDK
1 Set up the Development Environment
Please ensure that the development environment meets the following technical requirements:
- Xcode 5.0 or higher
- An iOS device running on iOS 7.0 or higher version with a camera and microphone. You may run your project on a simulated iOS device, but using a real device is recommended.
- The iOS device and your computer are connected to the Internet.
2 Integrate the SDK into Your Project
2.1 Choose either of the following methods to integrate the ZEGO Express SDK into your project.
Method 1: Integrate the SDK Automatically with CocoaPods
If you have not already done so, follow the CocoaPods Installation Guide to install CocoaPods on your computer.
cdinto the root directory of your project, and run
pod initto create a
Podfile, and add a CocoaPod by specifying
pod 'ZegoExpressEngine'inside your target block as illustrated below.
target 'MyProject' do use_frameworks! pod 'ZegoExpressEngine/Video' end
pod repo updateto update the local index to ensure that the latest version of
ZegoExpressEnginewill be installed. Please refer to the ZEGO Express-Video iOS SDK Release History for the latest version.
pod installto install the
Please refer to the “CocoaPodsFAQ” page for the troubleshooting of common problems you may encounter using CocoaPods.
If you want to use the Express-Video SDK that has the Whiteboard feature, please use the command:
Method 2: Manually add SDK to the project
Download the SDK
Please download the SDK from ZegoExpressEngine iOS , it is recommended to download and use XCFramework.
The official website provides two different packaging types of SDK, divided into XCFramework and traditional Framework.
XCFramework contains SDKs for iOS + iOS (Simulator) + macOS, which is recommended.
There are two folders in the download package of the traditional Framework:
armv7-arm64-x86_64, the differences are as follows:
armv7-arm64is only used for real machine debugging. Users need to use the
ZegoExpressEngine.frameworkunder this file in the final release, otherwise they may be called back by Apple.
armv7-arm64-x86_64contains libraries for real machine and simulator debugging. If you use the simulator to debug during the development process, you need to import the
ZegoExpressEngine.frameworkunder this folder. But when it is finally released, switch back to the framework under the
armv7-arm64folder. Note that this library may encounter compilation problems after Xcode 12.3, please refer to [FAQ-2].
Please select an SDK file that meets the development requirements.
1. Manually copy the SDK dynamic library file
ZegoExpressEngine.framework to the project directory.
2. Open Xcode and use [Add Files to "xxx" (xxx is the user's project name)] to add the SDK dynamic library files to the project.
In Xcode, select: Project TARGETS -> General -> Frameworks, Libraries, and Embedded Content, add ZegoExpressEngine.framework, and set Embed to Embed & Sign.
3 Add permissions
Select the project TARGETS -> Info -> Custom iOS Target Properties
Click the + Add button to add camera and microphone permissions.
Privacy-Camera Usage Description
Privacy-Microphone Usage Description
After the addition is complete, as shown in the figure:
An error was reported when packaging:
Failed to verify bitcode in ZegoExpressEngine.framework/ZegoExpressEngine
Please check whether the Xcode version is too low, and it is recommended to update the latest Xcode version; if you must use the old version of Xcode for packaging, please find the
Enable Bitcodeoption in the project's
Build Settingand set it to
NO, and then use the terminal
cdto the path where
ZegoExpressEngine.frameworkis stored in your project, and execute the following command to remove the bitcode in the SDK
xcrun bitcode_strip ZegoExpressEngine.framework/ZegoExpressEngine -r -o ZegoExpressEngine.framework/ZegoExpressEngine
When running the App, it prompts
Building for iOS Simulator, but the linked and embedded framework'ZegoExpressEngine.framework' was built for iOS + iOS Simulator.
After Xcode 12.3, the framework with iOS + iOS (Simulator) dual-platform architecture is prohibited by default. It is recommended to replace it with XCFramework recommended by Apple (you can choose to download XCFramework in the drop-down box in Download SDK Package). Or you can select "TARGETS > Build Settings > Validate Workspace" through Xcode and set the value of this parameter to YES to continue using the traditional framework.
5 Related Documents
After integrating the SDK, you can proceed to initialize the SDK. Use the next/previous buttons below or the side navigation bar on the left to navigate to the related documents.
- Quick Start - Initializing the SDK