# React Native

## Installation

```bash
npm install react-native-move-sdk --save
#or
yarn add react-native-move-sdk
```

## Setup

### iOS

#### Configuration

1. Using the **terminal**, access the **iOS folder** in your project
2. Run `$`<mark style="color:blue;">`pod install`</mark>&#x20;
3. Open the ***.xcworkspace*** folder using **Xcode**
4. Go to the **Capabilities** tab of your target settings
5. Turn on **Background Modes** and enable **Location updates**

![Location updates background mode capability](https://1197996007-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXD5xlIFUYU8eK_kkLo%2F-Ma7-Qp0tvRtlszHh2aC%2F-MaWrFoEnyiReo8XoJL3%2Fimage.png?alt=media\&token=171c219f-f0e1-4d9a-9fe8-a0ccb47078a6)

### Android

Include the maven repository to your gradle build script, where the MOVE SDK package is located.

```bash
maven { 
    url "https://dolphin.jfrog.io/artifactory/move-sdk-libs-release" 
}
```

Add the dependency for the  MOVE SDK Android library to your module (app-level) Gradle file (usually app/build.gradle).

{% hint style="info" %}
You can check for latest releases here:\
<https://dolphin.jfrog.io/ui/native/move-sdk-libs-release/io/dolphin/move/move-sdk>
{% endhint %}

## Permissions

{% hint style="danger" %}
**System Permissions**

Based on the passed [MoveConfigs](https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/models/moveauth) on[`initialization`](https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/api-interface/ios/intialization), the SDK determines the required permissions to activate the requested services. If all permissions are granted when the SDK is initialised, it will transit to the [MoveSDKState](https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/models/movedevicestatus) "`ready`".\
\
The host app **must** verify that all the permissions required for the passed configs are granted. In case the required permissions were missing when calling the SDK [initialization](https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/api-interface/ios/intialization) API, the [MoveSDKState](https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/models/movedevicestatus) will transit to [MoveSDKState](https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/models/movedevicestatus) "`permissionMissingerror`".

Check [iOS permission handling](https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/appendix/ios/permission-handling) and[ Android permission handling](https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/appendix/android/permission-handling) for details about permissions and background modes required for each service.
{% endhint %}
