logo
On this page

Sample Codes


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

  1. Download the latest version of iOS ZegoEffects SDK or Android ZegoEffects SDK, extract it, and import the Resources and Models folders into your downloaded sample code.

  2. Add a KeyCenter.js file in the root directory of the sample code with the following content. Fill in your appID, appSign, and effectLicense. For how to obtain these, please refer to Prerequisites.

    Untitled
    const 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
    Copied!
  3. In the root directory, install dependencies and run the sample code.

    Untitled
    yarn
    
    # Run iOS
    yarn ios
    
    # Run Android
    yarn android
    
    1
    Copied!

Previous

SDK Downloads

Next

Import the SDK