Sample Codes
Sample code
Click to download and extract the sample code
Prerequisites
Please ensure your development environment meets the following requirements:
- React Native 0.73.6 or above.
- iOS 13.0 or above and an iOS device or simulator that supports audio and video (real device recommended).
- Android 8.0 or above and an Android device or simulator that supports audio and video (real device recommended). For real devices, please enable "USB debugging".
- iOS/Android device connected to the Internet.
- Node.js installed, LTS version recommended as shown on their homepage.
Requirements
Please ensure the following requirements are met before running:
- Registered an account on ZEGOCLOUD Console and obtained the AppID and AppSign required for SDK initialization.
- Contacted ZEGOCLOUD technical support to obtain the License file for beauty effects.
Run the Sample Code
-
Download the latest version of iOS ZegoEffects SDK or Android ZegoEffects SDK, extract it, and import the
Resources
andModels
folders into your downloaded sample code.iOSAndroid -
Add a
KeyCenter.js
file in the root directory of the sample code with the following content. Fill in yourappID
,appSign
, andeffectLicense
. For how to obtain these, please refer to Prerequisites.Untitledconst KeyCenter = { // Get appID from https://console.zegocloud.com/account/login // For example: const appID = 123456789; appID: , // Get appSign from https://console.zegocloud.com/account/login, for example: "39011cbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" appSign: '', effectLicense: '', } export default KeyCenter
1 -
In the root directory, install dependencies and run the sample code.
Untitledyarn # Run iOS yarn ios # Run Android yarn android
1