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:
- Execute the
npm i zego-zim-react-native
oryarn add zego-zim-react-native
command to install the dependencies.
We recommend you use the NPM package that supports the TypeScript language.
- Import the SDK.
import ZIM from 'zego-zim-react-native';
- 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.
-keep class **.zego.**{*;}