# Integrating a Yarn package

> Add the Grovs SDK to your React Native project using yarn.

Source: https://docs.grovs.io/docs/how-to-guides/react-native/yarn

The wrapper requires React Native 0.70 or later and is auto-linked.

### 1. Install the package

```bash
yarn add react-native-grovs-wrapper
```

### 2. Add the Android SDK

Add the native SDK to `android/app/build.gradle`, at the version the wrapper is built against (`3.1.0` for wrapper 3.1.0, `3.0.1` for wrapper 3.0.2):

```groovy
implementation 'io.grovs:Grovs:3.1.0'
```

See [Android dependency](https://docs.grovs.io/docs/sdk/react-native/quick-start#android-dependency).

### 3. Install iOS pods

This pulls in the iOS SDK through the wrapper's `Grovs ~> 3.1` dependency (`~> 3.0` in wrapper 3.0.x):

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

### 4. Import the package

```javascript
import Grovs from 'react-native-grovs-wrapper';
```

### 5. Run the app

With a simulator, emulator or device connected:

**iOS**

```bash
npx react-native run-ios
```

**Android**

```bash
npx react-native run-android
```

> **Note:** Expo projects skip the Gradle and pod steps. The config plugin adds the Gradle line, and `npx expo prebuild` installs the pods.
