Installation
This guide will walk you through the steps to install the react-native-viewlytics
package in your React Native project.
Step 1: Install the package
Install the package using npm or yarn.
- npm
- Yarn
- Expo
npm install react-native-viewlytics
yarn add react-native-viewlytics
npx expo install react-native-viewlytics
Step 2: Install Peer Dependencies
The following peer dependencies are required for the package to work properly:
- npm
- Yarn
- Expo
npm install react-native-device-info
yarn add react-native-device-info
npx expo install react-native-device-info
You might get warnings related to peer dependencies after installation. They are usually caused by incorrect version ranges specified in some packages. You can safely ignore these warnings as long as your app builds and works as expected.
Step 3: Run pod install
Run the following command to install the required CocoaPods dependencies:
npx pod-install
Step 4: (For Expo projects only) Rebuild native dependencies
Run prebuild to update the native code in the ios
and android
directories.
npx expo prebuild
Step 5: You're ready!
Congratulations! You have successfully installed Viewlytics in your React Native project.
Now you can start integrating the package into your application. Check the Usage Guide to learn how to start capturing screenshots.