logo
In-app Chat
SDK Error Codes
Powered Byspreading
On this page

Integrate the ZIM Audio SDK

This topic describes how to integrate the ZIM Audio SDK.

Prerequisites

Before you integrate the ZIM Audio SDK, make sure that the following conditions are met:

  • Development environment:
    • React Native 0.60.0 or later
    • iOS 12.0 or above iOS real phones.
    • For real Android devices running Android 4.4 or above, please turn on the "Allow debugging" option.

Import the ZIM Audio SDK

The following shows how to integrate the SDK using NPM:

  1. Execute the npm i zego-zim-react-native or yarn add zego-zim-react-nativecommand to install the dependencies.
Note

We recommend you use the NPM package that supports the TypeScript language.

  1. Import the SDK.
Untitled
import ZIM from 'zego-zim-react-native';
1
Copied!
  1. Go to the iOS root directory, run the pod install command to install the dependencies.

After completing the above steps, you can use the zego-zim-react-native SDK in your project using JavaScript or TypeScript (recommended).

Setting permissions

Before using ZIM Audio SDK, please set microphone permissions to collect voice.

Prevent confusion

If you use React Native to develop Android applications, you also need to add the "-keep" class configuration to the SDK in the "proguard-rules.pro" file to prevent confusion with the SDK public class names.

Untitled
-keep class **.zego.**{*;}
1
Copied!

Previous

Overview

Next

Send and receive audio messages