> For the complete documentation index, see [llms.txt](https://docs.sentiance.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sentiance.com/getting-started/sdk-integration/2.-including-the-sdk/react-native/cli.md).

# CLI

## External Dependencies

Apart from the core React Native libraries, there are no additional external React Native library dependencies.

For external dependencies in the native SDKs, check out [this page](/getting-started/sdk-integration/2.-including-the-sdk/android.md#external-dependencies) for Android and [this one](/getting-started/sdk-integration/2.-including-the-sdk/ios.md#external-dependencies) for iOS.

## Steps

{% stepper %}
{% step %}

### **Install the Sentiance Core React Native module**

Run the command in Terminal:

{% code title="Terminal" %}

```bash
npm install @sentiance-react-native/core
```

{% endcode %}

The module should now be added to your project's **package.json** file.

{% code title="package.json" %}

```json
{
  ...,
  "dependencies": {
    ...,
    "@sentiance-react-native/core": "^6.x.x"
  }
}
```

{% endcode %}

The <mark style="color:$success;">**`@sentiance-react-native/core`**</mark> module must be installed before using any other Sentiance service.
{% endstep %}

{% step %}

### **Setup the Build Dependencies in the native folders**

#### iOS Build Dependencies

1. In the terminal, navigate to your project's iOS directory&#x20;
2. Run the command in Terminal:

{% code title="Terminal" %}

```bash
pod install --repo-update
```

{% endcode %}

#### Android Build Dependencies

Add the Sentiance repository to your **project-level&#x20;**<mark style="color:$success;">**`build.gradle`**</mark> file:

```kotlin
allprojects {
    repositories {
        ...
        maven { url "https://repository.sentiance.com" }
    }
}
```

This will allow Gradle to find and download the necessary native Sentiance SDK libraries.

{% hint style="info" %}
All Sentiance modules support [Autolinking](https://github.com/react-native-community/cli/blob/main/docs/autolinking.md), which is available since React Native v0.60, the minimum supported React Native version by Sentiance. Autolinking takes care of discovering and linking the native code dependencies to your project.
{% endhint %}
{% endstep %}

{% step %}

### Configuration and permissions

Next, we'll configure the project settings and permissions for both iOS and Android.

#### **iOS Configuration and Permissions**

Open your existing app project in Xcode.

For **project and permission settings**, follow these 3 steps from the Native iOS Setup guide:<br>

1. [Configure the Project Capabilities](/getting-started/sdk-integration/2.-including-the-sdk/ios.md#configure-the-project-capabilities)
2. [Include the Background Task Identifier](/getting-started/sdk-integration/2.-including-the-sdk/ios.md#include-the-background-task-identifier)
3. [Configure Privacy Permission Descriptions](/getting-started/sdk-integration/2.-including-the-sdk/ios.md#configure-privacy-permission-descriptions)

#### **Android Configuration**

When the Sentiance SDK runs in the background, it starts a foreground service. This causes Android to display a notification in the notification shade, and an icon on the system bar.

To **customize this notification**, you can update the <mark style="color:$success;">**`AndroidManifest.xml`**</mark> file as follows:

{% code title="AndroidManifest.xml" %}

```xml
<application ...>
    <meta-data android:name="com.sentiance.react.bridge.core.notification_id" android:value="1001"/>
    <meta-data android:name="com.sentiance.react.bridge.core.notification_title" android:resource="@string/app_name"/>
    <meta-data android:name="com.sentiance.react.bridge.core.notification_text" android:value="Touch to open."/>
    <meta-data android:name="com.sentiance.react.bridge.core.notification_icon" android:resource="@mipmap/ic_launcher"/>
    <meta-data android:name="com.sentiance.react.bridge.core.notification_channel_name" android:value="Detections"/>
    <meta-data android:name="com.sentiance.react.bridge.core.notification_channel_id" android:value="sentiance_detections"/>
    ...

```

{% endcode %}

By customizing the notification, you can tailor the appearance and behavior of the notification to match the branding and user experience of your application. This allows you to provide a seamless and consistent experience to your users while the Sentiance SDK operates in the background.

Please note that customizing the notification should be done carefully to ensure that it complies with Android guidelines and user preferences. By doing so, you can enhance the overall user experience and maintain a cohesive presentation of your app and the Sentiance SDK's background functionality.
{% endstep %}

{% step %}

### Next: Initialize the SDK

After having included the Sentiance SDK, proceed to [initializing the SDK](/getting-started/sdk-integration/3.-sdk-initialization/android.md#steps).
{% endstep %}
{% endstepper %}
