# Integration

The React Native libraries for DriveKit SDK are open source and available on GitHub: <https://github.com/DriveQuantPublic/react-native-drivekit>

If you want to get a sample code to install DriveKit in your React Native application, you can test our [demo application](https://github.com/DriveQuantPublic/react-native-drivekit/tree/main/packages/demo).

If you prefer to integrate the SDK directly into your application, please follow the next steps.

### Core

First you have to install the Core component which allows you to initialise the DriveKit SDK, to configure your API key and to declare a user. The Core component is mandatory.

React Native librairies are available via NPM. First, install the library:

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

and install iOS pods:

```bash
cd ios && pod install
```

The step by step procedure to initialise the SDK, set your API Key and create a user is described in the [Core component README](https://github.com/DriveQuantPublic/react-native-drivekit/blob/main/packages/core/README.md).

### **Trip Analysis**

After installing the Core component, you need to install the Trip Analysis component which allows you to record trips and configure the recording modes.&#x20;

First, install the library:

```bash
npm install @react-native-drivekit/trip-analysis
```

and install iOS pods:

```bash
cd ios && pod install
```

To initialise Trip Analysis and enable the autostart mode, follow the steps described in the Trip [Analysis component README](https://github.com/DriveQuantPublic/react-native-drivekit/tree/main/packages/trip-analysis#readme).

### **Driver Data**

The [Driver Data](https://docs.drivequant.com/driver-data/introduction) module manages the driver trips display (list and details) and ensures the synchronisation of driver data.

First, install the library:

```bash
npm install @react-native-drivekit/driver-data
```

and install iOS pods:

```bash
cd ios && pod install
```

To initialise Driver Data and get driver trips data, follow the steps described in the [Driver Data component README](https://github.com/DriveQuantPublic/react-native-drivekit/blob/main/packages/driver-data/README.md).

### **Trip Simulator**

To verify the DriveKit Trip Analysis component integration into your app, it is recommended to perform tests in real conditions. Before carrying out driving tests, it may be useful to validate the implementation of the SDK in your application.

For this purpose, DriveQuant provides the [Trip Simulator](https://docs.drivequant.com/trip-analysis/trip-simulator) component based on recorded GPS data.

{% hint style="warning" %}
It is strongly recommended **not** to integrate this component into an application built for production. This component has been designed to facilitate preliminary testing and should never remain in your production app.
{% endhint %}

First, install the library:

```bash
npm install @react-native-drivekit/trip-simulator
```

and install iOS pods:

```bash
cd ios && pod install
```

To start using the tool, follow the steps described in the [Trip Simulator component README](https://github.com/DriveQuantPublic/react-native-drivekit/blob/main/packages/trip-simulator/README.md).


---

# 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://docs.drivequant.com/react-native/integration.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.
