# React Native SDK

> Integrate deep linking, attribution, and smart links into your React Native app with the Grovs SDK.

Source: https://docs.grovs.io/docs/sdk/react-native

Deep linking, link generation, push campaigns, in-app messages, event and screen tracking, revenue and attribution for React Native. The `react-native-grovs-wrapper` package wraps the native iOS and Android SDKs, on the new architecture (TurboModules) or the legacy bridge. An Expo config plugin does the native setup.

**Requirements:** React Native 0.70+. The native SDKs need iOS 13.0 and Android 5.0 (API 21); your React Native version may need more.

| Wrapper      | iOS SDK (CocoaPods) | Android SDK (Maven Central) |
| ------------ | ------------------- | --------------------------- |
| 3.1.0        | `Grovs ~> 3.1`      | `io.grovs:Grovs:3.1.0`      |
| 3.0.2        | `Grovs ~> 3.0`      | `io.grovs:Grovs:3.0.1`      |
| 3.0.0, 3.0.1 | `Grovs ~> 3.0`      | `io.grovs:Grovs:3.0.0`      |

- [Quick Start](https://docs.grovs.io/docs/sdk/react-native/quick-start): Install and configure the SDK
- [Deep Linking](https://docs.grovs.io/docs/sdk/react-native/deep-linking): Handle incoming deep links
- [Link Creation](https://docs.grovs.io/docs/sdk/react-native/link-creation): Generate smart links and look them up
- [Push notifications](https://docs.grovs.io/docs/sdk/react-native/push-notifications): Push campaign opens, links and images (3.1)
- [In-app messages](https://docs.grovs.io/docs/sdk/react-native/in-app-messages): Dashboard campaigns shown inside your app (3.1)
- [Revenue](https://docs.grovs.io/docs/sdk/react-native/revenue): Track in-app purchases and custom payments
- [Events & Screen Tracking](https://docs.grovs.io/docs/sdk/react-native/analytics): Track custom events and React Navigation screens
- [Privacy & Consent](https://docs.grovs.io/docs/sdk/react-native/privacy): Gate collection on consent, and what the SDK collects
- [API Reference](https://docs.grovs.io/docs/sdk/react-native/api-reference): All methods and types

## Upgrading

**3.0.x to 3.1:** wraps iOS SDK 3.1 and Android SDK 3.1.0. Adds push campaigns, in-app messages and `linkDetails`, and removes the messages inbox. Bump `io.grovs:Grovs` to 3.1.0, run `pod install`, and check code that reads `DeeplinkResponse.link`, which is now optional. See the [upgrade guide](https://docs.grovs.io/docs/upgrade-guides/react-native-3-1).

**1.x to 3.0:** existing JavaScript keeps working except `logInAppPurchase`, which now takes an object. Pass `autoTrackScreenViews: false` and the wrapper's stored consent value to the native `configure` calls. See the [3.0 upgrade guide](https://docs.grovs.io/docs/upgrade-guides/react-native-3-0).

In Expo projects, re-run `npx expo prebuild --clean` after each upgrade.

## Example apps

- Full integration demo: [grovs-io/grovs-react-native-example-app](https://github.com/grovs-io/grovs-react-native-example-app)
- New architecture and legacy bridge examples: [grovs-io/grovs-react-native](https://github.com/grovs-io/grovs-react-native)
