Integration
The minimal supported version of React Native is 0.60.0
or higher
The minimal supported iOS version is 11.0
or higher
The minimal supported Android API version is 21
or higher
1. Install dependencies
Add dependency to your project in the package.json
file:
"dependencies": {
"@credolab/react-proxy-encrypt": "3.0.0"
},
Add .npmrc
file at the root level of the project with the path to the plugin repository
@credolab:registry=https://npm.cloudsmith.io/credolab/hybrid/
Open a terminal window on the root path of your project and execute:
npm install
Add repositories for Android
Open android/build.gradle
file and add the repository according to your flow:
allprojects {
repositories {
// ...
maven { url "https://dl.cloudsmith.io/$TOKEN/credolab/proxyen-sdk/maven/" }
}
}
Add repositories for iOS
Add the Cocoapods repository to the beginning of the ios/Podfile
file
source 'https://token:[email protected]/basic/credolab/proxyen-sdk/cocoapods/index.git'
Unable to find a specification for
library_name
?In certain cases you may see the error with similar title during pods installation.
To fix this, please add the following CocoaPods CDN to the Podfilesource 'https://cdn.cocoapods.org/'
Install Pods
Install pods by executing
pod install
2. Build and Use Credoappsdk
Credoappsdk
In your React Native app code open the file where theCredoappsdk
planned to be used.
Add plugin import
import CredoAppService from '@credolab/react-proxy-encrypt';
Call CredoAppService.execute()
method to start the data collection process
await CredoAppService.execute()
Note
Relevant for Android only
Add functionality for requesting permissions before starting the data collection process in case there are used modules that require granting dangerous permissions. The detailed info about modules can be found here.
Done!
3. Run an App
To run an app on an Android device:
react-native run-android
To run app on an iOS device:
react-native run-ios
Next Steps
After successfully integrating our SDK, it is recommended to proceed with the following steps to utilise our platform effectively:
- Setting up your Reverse Proxy
- Uploading your Dataset. Once the server is configured, you can upload your dataset using the server address.
- Collecting your Dataset Insight or TruValidate(formerly known as iovation) Fraud Check. With the dataset uploaded, you can now get insights or perform TruValidate Fraud Checks to assess risk based on the device and transaction details provided.
If you have any further questions, please do not hesitate to contact us.
Updated about 1 month ago