Docs

Integrating an NPM Package

Add the Grovs SDK to your React Native project using npm.

npm is the default package manager for React Native projects. Follow these steps to integrate the Grovs SDK.

1

Install the Grovs package

Use npm to install the Grovs wrapper:

Bash
npm install react-native-grovs-wrapper

npm will download the package and add it to your package.json.

2

Link native dependencies (if needed)

For React Native 0.60 and above, native dependencies are auto-linked. If you are using an older version:

Bash
npx react-native link react-native-grovs-wrapper
3

Install iOS pods

Navigate to the iOS directory and install CocoaPods dependencies:

Bash
cd ios && pod install
4

Import the package in your code

In your JavaScript or TypeScript files:

import Grovs from 'react-native-grovs-wrapper';
5

Run the app

Build and run your React Native project:

Bash
npx react-native run-ios

Make sure you have an iOS simulator or Android emulator running, or a physical device connected.