# Installation

Detour provides a React Native SDK (`@swmansion/react-native-detour`) compatible with Expo and bare React Native projects.

## Install

```bash
    npm install @swmansion/react-native-detour
    ```

  ```bash
    yarn add @swmansion/react-native-detour
    ```
  ```bash
    pnpm add @swmansion/react-native-detour
    ```
  ```bash
    bun add @swmansion/react-native-detour
    ```
  ### Additional dependencies

```bash
    npm install expo-localization react-native-device-info expo-clipboard @react-native-async-storage/async-storage expo-application
    ```

  ```bash
    yarn add expo-localization react-native-device-info expo-clipboard @react-native-async-storage/async-storage expo-application
    ```

  ```bash
    pnpm add expo-localization react-native-device-info expo-clipboard @react-native-async-storage/async-storage expo-application
    ```

  ```bash
    bun add expo-localization react-native-device-info expo-clipboard @react-native-async-storage/async-storage expo-application
    ```

  :::note[Device info provider]
`react-native-device-info` is a required peer dependency. Unlike storage, the device info source is not configurable. The SDK imports the library directly to read the device model, manufacturer, OS version, and user agent for the deferred-link fingerprint. There is no adapter to plug in.
:::

:::note[Expo managed workflow]
After installing react-native-device-info in expo managed workflow you need to create custom development build
https://docs.expo.dev/develop/development-builds/introduction/
:::

:::note[Custom storage]
You can override the default persistent storage (@react-native-async-storage/async-storage) by providing an alternative storage implementation. Pass your custom storage object via the configuration settings. [See more](https://detour.swmansion.com/docs/sdk/react-native/custom-storage)
:::