# Import the SDK

The IMS SDK React Native Wrapper is a private pub package containing public API implementations for interacting with the portal device API and the trip detection manager.

To add it to your project you need to add the following lines to the `package.json` of your application:

```bison
{
    ...,
    "dependencies": {
        ...,
        "ims-react-native": "git+https://[YOUR_GITHUB_TOKEN]@github.com/ims-developers/reactNative-sdk.git"
    }
}
```

You need to replace YOUR\_GITHUB\_TOKEN with the token you create on the GitHub. See how to do this [here](https://docs.github.com/en/enterprise-server@3.9/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).

The `ims-react-native` module must be installed before using any other IMS service.

Then run the following command inside your project folder:

```
npm install
```

After installing the package do not forget to update the Pod for iOS. To do this, go to the ios folder and run following command:

```
pod install
```

Also you have to import the SDK on [iOS](/readme/ios/importing-the-sdk.md) and [Android](/readme/android/import-the-sdk.md). Please check these pages to import the SDK for specific platform.

### Native

#### iOS Setup

In the terminal, run the following command inside your project's **ios** directory:

`pod install --repo-update`

#### Android setup

Make sure that you have added the IMS maven repository to the **build.gradle** file in your project's **android** directory:

android/build.gradle

```
allprojects {
    repositories {
        ...
        maven {
            url 'https://maven.pkg.github.com/ims-developers/android-sdk'
            name 'GitHubPackages'
            credentials {
                 username your_login
                 password your_password
            }
        }
    }
}
```

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sdk.ims.tech/readme/other-platforms/react-native/import-the-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
