Installation
Installing the package
1. Configuring the npm registry
Create an .npmrc file at the root of your project:
@qitech:registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=NPM_TOKEN_SENT_BY_QI_TECH
Replace NPM_TOKEN_SENT_BY_QI_TECH with the token provided by support. If you have not received your token yet, contact suporte.caas@qitech.com.br.
2. Installing the dependency
yarn add @qitech/react-native-caas
3. Import
import {
CAAS_ENVIRONMENT,
CAAS_FONT_FAMILY,
CAAS_LOG_LEVEL,
FACE_RECON_AUDIO_CONFIGURATION,
FACE_RECON_ERROR,
startFaceRecon,
} from '@qitech/react-native-caas';
Android setup
1. QI Tech Maven repository
Add QI Tech's Maven repository to your project-level build.gradle:
allprojects {
repositories {
maven { url 'https://sdks.qitech.com.br/' }
...
}
}
2. AdMob
Initialize the AdMob service by adding the following code to your AndroidManifest.xml:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="<ADMOB_APP_ID>"/>
If you do not have an ADMOB_APP_ID, contact suporte.caas@qitech.com.br.
iOS setup
1. Camera permission
Add an NSCameraUsageDescription entry to your app's Info.plist, with the reason why your app requires camera access:
<key>NSCameraUsageDescription</key>
<string>We need the camera to capture your selfie</string>