Integrating a Yarn Package
Add the Grovs SDK to your React Native project using yarn.
Yarn is an alternative package manager for React Native projects. Follow these steps to integrate the Grovs SDK.
1
Install the Grovs package
Use yarn to install the Grovs wrapper:
Bash
yarn add react-native-grovs-wrapperYarn 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-wrapper3
Install iOS pods
Navigate to the iOS directory and install CocoaPods dependencies:
Bash
cd ios && pod install4
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-iosMake sure you have an iOS simulator or Android emulator running, or a physical device connected.