Getting Started - React Native SDK
React Native apps require native configuration on both Android and iOS. The quickest way to get started is:
-
Install the SDK package
npm install "@videosdk.live/react-native-sdk@2.0.0"# oryarn add "@videosdk.live/react-native-sdk@2.0.0"v2.0.0 needs React Native 0.74 or later and React 18.0 or later.
-
Configure the native projects
-
Android: set
minSdkVersionto 24. React Native links the SDK automatically, sosettings.gradleandMainApplicationneed no changes.android/build.gradlebuildscript {ext {minSdkVersion = 24}}If you minify your release build, add
-keep class videosdk.org.** { *; }and-dontwarn videosdk.org.**toandroid/app/proguard-rules.pro. The Android setup guide has the full steps, including the permissions inAndroidManifest.xml. -
iOS: add the
VideoSDKRTCpod inside your app'stargetblock, raise the platform to iOS 18.0, and runpod install. Set the iOS Deployment Target of your app target to 18.0 in Xcode as well, and addNSCameraUsageDescriptionandNSMicrophoneUsageDescriptiontoInfo.plist. The iOS setup guide has the full steps.ios/Podfileplatform :ios, '18.0'target 'YourApp' do# ...pod 'VideoSDKRTC', :podspec => '../node_modules/@videosdk.live/react-native-sdk/ios/VideoSDKRTC.podspec'end -
Expo: use version 2 of
@videosdk.live/expo-config-plugin, which adds theVideoSDKRTCpod for you, and set the iOS deployment target to 18.0. You still need a development build. Follow the Expo setup guide.
-
-
Ask for camera and microphone access
On Android, the SDK does not ask the user for camera and microphone access. Call
requestPermission()fromuseMediaDevicebefore a host joins, and beforechangeMode("SEND_AND_RECV")turns a viewer into a host. iOS asks on its own.
Refer to the platform-specific guides linked above for detailed code snippets and troubleshooting tips. To upgrade an app from v1.x.x, follow the Migration Guide.
Got a Question? Ask us on discord