> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup

> Set up CometChat Calls SDK v5 for React Native with installation, app credentials, initialization, authentication, and a basic calling flow.

<Info>
  **Faster Integration with UI Kits**

  If you're using CometChat UI Kits, voice and video calling can be quickly integrated:

  * Incoming & outgoing call screens
  * Call buttons with one-tap calling
  * Call logs with history

  👉 [React Native UI Kit Calling Integration](/docs/ui-kit/react-native/call-features)

  Use this Calls SDK directly only if you need custom call UI or advanced control.
</Info>

This guide walks you through installing the CometChat Calls SDK and configuring it in your React Native application.

## Add the CometChat Dependency

### Using npm

```bash theme={null}
npm install @cometchat/calls-sdk-react-native
```

### Using Yarn

```bash theme={null}
yarn add @cometchat/calls-sdk-react-native
```

## Install Required Dependencies

The Calls SDK relies on the following packages. Install them alongside the SDK:

| Package                                     | Version    |
| ------------------------------------------- | ---------- |
| `@react-native-async-storage/async-storage` | `^2.1.2`   |
| `react-native-background-timer`             | `^2.4.1`   |
| `react-native-performance`                  | `^5.1.2`   |
| `react-native-svg`                          | `^15.12.0` |
| `react-native-url-polyfill`                 | `2.0.0`    |
| `react-native-webrtc`                       | `124.0.7`  |

### Using npm

```bash theme={null}
npm install @react-native-async-storage/async-storage@^2.1.2 react-native-background-timer@^2.4.1 react-native-performance@^5.1.2 react-native-svg@^15.12.0 react-native-url-polyfill@2.0.0 react-native-webrtc@124.0.7
```

### Using Yarn

```bash theme={null}
yarn add @react-native-async-storage/async-storage@^2.1.2 react-native-background-timer@^2.4.1 react-native-performance@^5.1.2 react-native-svg@^15.12.0 react-native-url-polyfill@2.0.0 react-native-webrtc@124.0.7
```

## iOS Configuration

### Install CocoaPods Dependencies

Navigate to your iOS directory and install the pods:

```bash theme={null}
cd ios
pod install
cd ..
```

### Add Permissions

Add the required permissions to your `ios/YourApp/Info.plist`:

```xml theme={null}
<key>NSCameraUsageDescription</key>
<string>Camera access is required for video calls</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required for voice and video calls</string>
```

### Enable Background Modes

For calls to continue when the app is in the background:

1. Open your project in Xcode
2. Select your target and go to **Signing & Capabilities**
3. Click **+ Capability** and add **Background Modes**
4. Enable:
   * **Audio, AirPlay, and Picture in Picture**
   * **Voice over IP** (if using VoIP push notifications)

## Android Configuration

### Add Permissions

Add the required permissions to your `android/app/src/main/AndroidManifest.xml`:

```xml theme={null}
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
```

<Note>
  For Android 6.0 (API level 23) and above, you must request camera and microphone permissions at runtime before starting a call.
</Note>

### Request Runtime Permissions

Use a library like `react-native-permissions` or implement native permission requests:

```tsx theme={null}
import { PermissionsAndroid, Platform } from 'react-native';

async function requestCallPermissions(): Promise<boolean> {
  if (Platform.OS === 'android') {
    const granted = await PermissionsAndroid.requestMultiple([
      PermissionsAndroid.PERMISSIONS.CAMERA,
      PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,
    ]);
    
    return (
      granted['android.permission.CAMERA'] === PermissionsAndroid.RESULTS.GRANTED &&
      granted['android.permission.RECORD_AUDIO'] === PermissionsAndroid.RESULTS.GRANTED
    );
  }
  return true;
}
```

## Verify Installation

After installation, rebuild your app:

```bash theme={null}
# iOS
npx react-native run-ios

# Android
npx react-native run-android
```

## Related Documentation

* [Authentication](/docs/calls/react-native/authentication) - Initialize the SDK and authenticate users
* [Join Session](/docs/calls/react-native/join-session) - Start your first call
