Skip to main content
Version: 2.x.x

Run Interactive Live Streaming Project - React Native

Video SDK provides an open-source sample project videosdk-ils-react-native-sdk-example on Github. This document introduces how to run the project.

note

The sample project still uses React Native SDK v1.0.1. To build an app on v2.0.0, follow the Interactive Live Streaming Quick Start. The Migration Guide lists what changed in v2.0.0.

Prerequisites​

  • Node.js 18 or later
  • Valid Video SDK Account
  • For Android
    • Java Development Kit (JDK) 17
    • Android Studio (latest version recommended)
    • An Android device running Android 7.0 (API level 24) or later, or an emulator
  • For iOS
    • Xcode (latest version recommended)
    • CocoaPods
    • An iPhone or iPad running iOS 18.0 or later

Generate Token​

To manage secured communication, every participant that connects to a meeting needs an access token. You can easily generate this token by using your apiKey and secret-key, which you can obtain from the VideoSDK Dashboard.

For development purpose, you can generate a temporary token from VideoSDK Dashboard's API section.


tip

The best practice for obtaining a token involves generating it from your backend server which will help in keeping your credentials safe.

Run the Sample Project​

Step 1: Clone the sample project​

Clone the repository to your local environment.

git clone https://github.com/videosdk-live/videosdk-ils-react-native-sdk-example

Step 2: Modify api/api.js file​

Modify the file by pasting the previously generated temporary token here.

api/api.js
export const getToken = async () => {
return "VIDEOSDK_DASHBOARD_TOKEN"; // Update Token here
};

Step 3: Install the dependencies​

Install all the project dependencies.

npm install

Step 4: Run the Sample App​

The sample is an Expo app with native code, so it does not run in Expo Go. These commands build the app, install it on your device or emulator and start it.

# For Android
npm run android

# For iOS
npm run ios

Got a Question? Ask us on discord