Metric React Native SDK 2 Integration Guide
Overview​
MetricSDK is a React Native library designed to facilitate token-based identity verification through the Metric Africa service. The SDK provides methods to initiate token verification and check the status of a verification token, as well as a modal for displaying the verification process.
Features​
- Token Verification: Initiate token-based verification processes with configurable parameters.
- Token Status Check: Retrieve the status of verification tokens.
- Verification Modal: Seamless integration with a react native modal for user interactions.
Prerequisite​
You should have the following already installed
react-native-webview
react-native-safe-area-context
You should also have camera permissions set up for the application. You can do it on each platform's config; build.gradle for Android or info.plist for iOS. You can also do that in the app.json file:
Camera permissions for iOS:
{
"ios": {
// ...
"infoPlist": {
"NSCameraUsageDescription": "To allow Metric Example App access your camera in order to verify your identity."
}
}
}
Camera permissions for Android:
{
"android": {
// ...
"permissions": ["android.permission.CAMERA"]
}
}