logo
On this page

Integrate the SDK


Prepare the environment

Before you integrate ZegoMiniGameEngine SDK, make sure that the development environment meets the following requirements:

  • Xcode 13.0 or later is installed.
  • iOS 11.0 or later is installed. We recommend that you use a physical device.
  • The iOS device is connected to the internet. We recommend that you use a physical device.

Integrate SDKs

1. Optional: Create a project

2. Import ZEGOCLOUD Express SDK

ZEGOCLOUD MiniGameEngine SDK must be used with ZEGOCLOUD Express SDK 3.1.1 or later. If your project is already integrated with ZEGOCLOUD Express SDK of a proper version, skip this step. Otherwise, integrate ZEGOCLOUD Express SDK by referring to the following topics:

3. Import ZEGOCLOUD MiniGameEngine SDK

1
Download the latest SDK and decompress the SDK

For more information, see Download .

2
Copy the SDK dynamic library files ZegoMiniGameEngine.xcframework and zreporter.framework to the project directory. ios-arm64 indicates that the ARM64 architecture is applicable to physical iOS devices.
3
Open Xcode

Choose File > Add Files to XXX to add the SDK library files to the project. The XXX variable varies based on your project name.

4
Choose TARGETS > General > Frameworks,Libraries,and Embedded Content.

Add the ZegoMiniGameEngine.xcframework and zreporter.framework files, and set the Embed parameter to Embed & Sign.

4. Optional: Grant permissions

To allow your project to support live streaming and voice chatroom scenarios, grant camera and microphone permissions to the SDK.

1
In Xcode, choose TARGETS > Info > Custom iOS Target Properties.
2
Click the plus icon (+) to grant the camera and microphone permissions.
  • Privacy - Camera Usage Description
  • Privacy - Microphone Usage Description

The following figure shows the result where the camera and microphone permissions are granted.

What to do next

After you perform the preceding steps, the SDKs are integrated with your project. Then, you can read the following docs to start streaming the live comment-based games:

Previous

Run sample codes

Next

Implement live comment-based games on PCs as a host