About the Sample App
The Verisoul React Native SDK is a demonstration project that showcases Verisoul’s fake user detection technology in a React Native environment. The app includes:- Complete integration of Verisoul’s React Native SDK
- Touch event tracking for fraud detection
- Platform-specific configurations for Android and iOS
Prerequisites
Before you begin, you’ll need:- Node.js and npm installed on your system
- React Native development environment set up
- For Android: Android Studio and Android SDK
- For iOS: Xcode and CocoaPods
- A Verisoul Project ID (obtain this by scheduling a call)
Installation Steps
1. Add the Dependency
Choose one of the following methods to add the Verisoul SDK to your project: Using NPM:2. EXPO Configuration
The Verisoul SDK is not supported in Expo Go. If you’re using Expo’s managed workflow, follow these steps:- Install the Expo development client:
- Modify the scripts section in your package.json:
- Install the Verisoul SDK:
- If you encounter download issues with the
ai.verisoul:android
package, add this Maven repository to yourandroid/build.gradle
file:
3. Implementation
Initialize the SDK
In your app’s main component:Get Session ID
Get the session ID after initialization:Implement Touch Tracking
Wrap your app with the touch tracking component:4. Platform-Specific Setup
Android Setup
Modify your MainActivity.kt file to track touch events:iOS Setup
- Add the App Attest capability to your project
- Update your entitlements file:
- Add the privacy manifest file (PrivacyInfo.xcprivacy) to your project
What to Expect
Once integrated, the Verisoul SDK will:- Monitor touch events and device motion
- Gather necessary data to detect automation and fraud
- Generate a session ID for risk assessment through Verisoul’s API
- Provide fraud prevention for your React Native application