Skip to main content

Installation

Installing the plugin

Run the command below at the root of your Flutter project:

flutter pub add flutter_kyc_qitech

The command installs the latest version and adds the dependency to your pubspec.yaml:

dependencies:
flutter_kyc_qitech: ^5.3.0

Then fetch the dependencies:

flutter pub get

Import

import 'package:flutter_kyc_qitech/flutter_kyc_qitech.dart';

And instantiate the plugin:

final _qitechFlutterKycPlugin = FlutterKycQitech();

Android setup

1. QI Tech Maven repository

Add the reference to QI Tech's Android repository in your project's 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 the photo of your document</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

By default, CocoaPods builds static libraries rather than frameworks. Add the following to your Podfile:

use_frameworks! :linkage => :static

4. Module stability

QI Tech's native dependencies require BUILD_LIBRARY_FOR_DISTRIBUTION to be enabled for the Datadog targets. 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|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'NO'
# The line below is only required to build on simulators (with Rosetta active)
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
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

In your Flutter app's ios directory, run:

cd ios
pod install

or, alternatively, through Flutter:

flutter build ios
Warning

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