Before integrating the ZEGO Express SDK, make sure the development environment meets the following requirements:
Skip this step if a project already exists.
Product Name and Organization Identifier are required, which will be used for creating the App UID - Bundle Identifier.
Choose either of the following methods to integrate the ZEGO Express SDK into your project.
Install CocoaPods. For more details, see CocoaPods Installation Guide .
Open the Terminal, enter the root directory of the project, and execute the command pod init
to create a Podfile
.
Open Podfile
, add pod 'ZegoExpressEngine/Video'
, and change MyProject
to your target name.
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
Execute pod repo update
to 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 .
Execute pod install
to install the SDK.
For common problems you may encounter when using CocoaPods, see CocoaPods FAQ .
Copy the SDK dynamic library file ZegoExpressEngine.framework
to 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.
Permissions can be set as needed.
Privacy-Camera Usage Description
Privacy-Microphone Usage Description
The error occurs when packaging the app: Failed to verify bitcode in ZegoExpressEngine.framework/ZegoExpressEngine.
Recommendations:
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 terminal
to execute cd DIRECTORY
to 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