Skip to main content

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>

2. QI Tech iOS repository source​

Add the following sources at the top of your Podfile:

source 'https://cdn.cocoapods.org/'
source 'https://github.com/QITechSDKs/iOS.git'

3. Static frameworks​

Required only if you use Xcode older than version 26:

use_frameworks! :linkage => :static
Warning

Flipper does not work with use_frameworks!. Remove the use_flipper() call from your Podfile if it is present.

4. Module stability​

The Datadog dependencies require BUILD_LIBRARY_FOR_DISTRIBUTION to be enabled. Add the post_install block below (or merge it into your existing post_install):

post_install do |installer|
installer.pods_project.targets.each do |target|
if ['DatadogCore', 'DatadogInternal', 'DatadogCrashReporting', 'DatadogLogs'].include?(target.name)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.5'
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
end

5. Installing the pods​

cd ios && pod install
Warning

If your app already uses Datadog, use the latest version within major 3.x. If it uses MLKit's FaceDetection, use the latest version within major 8.x.

Expo setup​

The package includes an Expo config plugin that automatically applies all the native iOS and Android setup described above. In your app.json:

{
"expo": {
"plugins": ["@qitech/react-native-caas"]
}
}

Then run prebuild to apply the native changes:

npx expo prebuild