Ask or search…
Comment on page

Getting started

This page presents the first steps to using the Identity SDK for React Native.
All integration will be based on files already present in the sample repository.
For security reasons, our repository is private, if you want to perform the integration with the product, please contact the person responsible for your service.


  1. 1.
    Copy the files and, located in the example repository in the path SDKsExample/android/app/src/main/java/com/sdksexample/ **** to the folder **** <root-project>/android/app/src/main/java/com/<your-package-name> in your project.
Note: the function getName will be used to call the method on the React Native side; The method annotated with @ReactMethod will be used for the calls on the React Native side.
2. Reference the module in your
import com.<your-package-name>;
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
packages.add(new CombateAFraudePackage());
3. In the <root-project>/android/build.gradle file add our Maven repository and the minSdkVersion setting for at least API 21:
buildscript {
ext {
minSdkVersion = 21
allprojects {
repositories {
maven { url "" }
4. In the <root-project>/android/app/build.gradle file add our project settings:
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
aaptOptions {
noCompress "tflite"
dataBinding {
enabled = true
5. In the same file, add the Identity dependencies:
dependencies {
implementation 'com.combateafraude.sdk:identity:<sdk_version>'
6. Update the dependencies by running the following commands:
cd android
./gradlew clean bundleRelease
./gradlew build --refresh-dependencies
Note: Check that you are running Java version 1.8. If not, run it:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`


  1. 1.
    In the <root-project>/ios/Podfile, make sure the minimum iOS version is 12.4+, add the line use_frameworks! and disable Flipper:
platform :ios, '12.4'
target '<app-name>' do
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
# use_flipper!
# post_install do |installer|
# flipper_post_install(installer)
# end
target '<app-name>-tvOS' do
source ''
source ''
2. In the same file, add the iOS SDKs you want to use:
target '<app-name>' do
pod 'Identity', '~> <version>'
3. Run the command cd ios && pod install && cd .. to install the dependencies
4. Copy the SDKsExample-Bridging-Header.h, CombateAFraude.m and CombateAFraude.swift files, located in the repository in the **SDKsExample/ios ** path, to the <root-project>/ios folder
5. In case you have any issues running the project after completing all the steps, add this code line in your Podfile and run the command cd ios && pod install && cd ..
post_install do |installer|
# This resolves any possible deployment issue by making sure it is the same as the project
def fix_deployment_target(installer)
return if !installer
project = installer.pods_project
project_deployment_target = project.build_configurations.first.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
puts "Make sure all pods deployment target is #{}"
project.targets.each do |target|
puts " #{}".blue
target.build_configurations.each do |config|
old_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
new_target = project_deployment_target
next if old_target == new_target
puts " #{}: #{old_target.yellow} -> #{}"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = new_target
def enable_bitcode(installer)
return if !installer
installer.pods_project.build_configurations.each do |config|
# config.build_settings['ENABLE_BITCODE'] = 'YES'
# config.build_settings['OTHER_CFLAGS'] = '-fembed-bitcode'
# config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'
config.build_settings['DEAD_CODE_STRIPPING'] = 'YES'
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'

Calling the application codes

The App.js file in the example repository shows how to call these methods and access their results.
Last modified 8mo ago