For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Android

  1. Copy the files CombateAFraudeModule.java and CombateAFraudePackage.java, 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 MainApplication.java

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 "https://repo.combateafraude.com/android/release" }
    }
}

4. In the <root-project>/android/app/build.gradle file add our project settings:

5. In the same file, add the Identity dependencies:

6. Update the dependencies by running the following commands:

Note: Check that you are running Java version 1.8. If not, run it:

iOS

  1. In the <root-project>/ios/Podfile, make sure the minimum iOS version is 12.4+, add the line use_frameworks! and disable Flipper:

2. In the same file, add the iOS SDKs you want to use:

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 ..

Calling the application codes

The App.js file in the example repository shows how to call these methods and access their results.

Last updated