Integrating an npm package
Add the Grovs SDK to your React Native project using npm.
The wrapper requires React Native 0.70 or later and is auto-linked.
1
Install the package
Bash
npm install react-native-grovs-wrapper2
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.
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 install4
Import the package
javascript
import Grovs from 'react-native-grovs-wrapper';5
Run the app
With a simulator, emulator or device connected:
Bash
npx react-native run-iosBash
npx react-native run-androidExpo projects skip the Gradle and pod steps. The config plugin adds the Gradle line, and npx expo prebuild installs the pods.
Was this page helpful?