### Install and Setup QoreID SDK for Bare React Native Source: https://docs.qoreid.com/docs/v210-rc Installs the QoreID SDK for Bare React Native projects and runs the setup script. Includes commands to run the app and remove the SDK. ```sh yarn add @qore-id/react-native-qoreid-sdk@2.1.0-rc ``` ```sh npx qoreid-setup ``` ```sh yarn ios ``` ```sh yarn android ``` ```sh yarn remove @qore-id/react-native-qoreid-sdk ``` -------------------------------- ### Add QoreID Repositories (Groovy) Source: https://docs.qoreid.com/docs/installation-and-setup Configure your project-level repositories to include Maven Central, QoreID releases, and Jitpack. This allows Gradle to download the necessary QoreID SDK artifacts. ```groovy repositories { mavenCentral() maven { url "https://repo.qoreid.com/repository/maven-releases/" } maven { url 'https://jitpack.io' } } ``` -------------------------------- ### Install QoreID SDK with Swift Package Manager Source: https://docs.qoreid.com/docs/ios-installation-and-setup Import the QoreID SDK and its dependencies using Swift Package Manager. This involves adding the provided Git repository URLs to your project's package dependencies. Ensure you are using Swift 5.0 or later. ```swift import QoreIDSDKiOSDependencies import QoreIDSDKiOS ``` -------------------------------- ### Configure Proguard Rules (Text) Source: https://docs.qoreid.com/docs/installation-and-setup Add Proguard rules to keep QoreID SDK classes during code shrinking and obfuscation. This prevents the SDK from being removed or altered incorrectly. ```text -keep class com.qoreid.sdk.** { *; } ``` -------------------------------- ### Install QoreID SDK with CocoaPods Source: https://docs.qoreid.com/docs/ios-installation-and-setup Add the QoreIDSDK to your project's Podfile. You can install the latest version or specify a particular version number. This method is for integrating the SDK using CocoaPods. ```ruby pod 'QoreIDSDK' ``` ```ruby pod 'QoreIDSDK', '1.0.0' ``` -------------------------------- ### Add QoreID SDK Dependency (Groovy) Source: https://docs.qoreid.com/docs/installation-and-setup Include the QoreID SDK as an implementation dependency in your app module's `build.gradle` file. This specifies the SDK version to be used in your project. ```groovy dependencies { implementation 'com.qoreid:qoreid-sdk:1.4.5' } ``` -------------------------------- ### Enable Java 8 Support (Groovy) Source: https://docs.qoreid.com/docs/installation-and-setup Configure your Android project to compile with Java 8 compatibility. This is often required for modern SDKs and language features. For Kotlin projects, ensure `jvmTarget` is set to `1.8`. ```groovy android { // ... compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } // For kotlin codebases, include kotlinOptions { jvmTarget = "1.8" } } ``` -------------------------------- ### Install iOS Pods and Rebuild Flutter App Source: https://docs.qoreid.com/docs/qoreid-flutter-sdk After modifying the Podfile, navigate to the 'ios' directory and run 'pod install' to install the necessary native dependencies. Finally, clean and rebuild your Flutter application to apply all changes. ```sh cd ios pod install ``` ```sh flutter clean && flutter pub get && flutter run ``` -------------------------------- ### Launch QoreID SDK in Swift Source: https://docs.qoreid.com/docs/usage-overview-ios Demonstrates how to launch the QoreID SDK from a view controller. The SDK requires a navigation controller context and accepts parameters for initialization. A closure is provided to handle the SDK's response. ```swift QoreIdSdk.shared.launch(param: param, vc: self) { result in print(result) } ``` -------------------------------- ### QoreID SDK Usage Example (Dart) Source: https://docs.qoreid.com/docs/qoreid-flutter-sdk A comprehensive Flutter example demonstrating how to integrate and launch the QoreID verification process. It includes setting up the main app structure, listening for verification results, and launching the SDK with necessary data. Requires the `qoreidsdk` Flutter package. ```dart import 'package:flutter/material.dart'; import 'package:qoreidsdk/qoreidsdk.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( home: const HomePage(), theme: ThemeData(useMaterial3: true), ); } } class HomePage extends StatefulWidget { const HomePage({super.key}); @override State createState() => _HomePageState(); } class _HomePageState extends State { @override void initState() { super.initState(); _listenToResults(); } void _listenToResults() { Qoreidsdk.onResult((result) { print('QoreID Result: $result'); if (result['data']?['verification'] != null) { final verificationId = result['data']['verification']['id']; print('Verification ID: $verificationId'); } }); } void _launchQoreID() async { final data = QoreidData( clientId: "your-client-id", customerReference: "cust_12345", productCode: "face_verification", // or "verifind_4d", "passport", etc. flowId: 0, addressData: {}, applicantData: {}, ocrAcceptedDocuments: "", identityData: {}, ); await Qoreidsdk.launchQoreid(data); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text('QoreID SDK Demo')), body: Center( child: ElevatedButton( onPressed: _launchQoreID, child: const Text('Launch QoreID Verification'), ), ), ); } } ``` -------------------------------- ### OpenAPI Definition for Countries Endpoint Source: https://docs.qoreid.com/reference/countries This OpenAPI 3.1.0 definition describes the '/v1/countries' GET endpoint. It specifies the server URL, authentication methods (OAuth2), and the structure of the request and response, including an example of a successful response. ```json { "openapi": "3.1.0", "info": { "title": "lists", "version": "1.0" }, "servers": [ { "url": "https://api.qoreid.com" } ], "components": { "securitySchemes": { "sec0": { "type": "oauth2", "flows": {} } } }, "security": [ { "sec0": [] } ], "paths": { "/v1/countries": { "get": { "summary": "Get Countries", "description": "Fetch list of countries", "operationId": "countries", "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "\t[\n {\n \t\"id\": 1,\n \"code\": \"NG\",\n \"name\": \"Nigeria\"\n }\n ]\n" } }, "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "default": 0 }, "code": { "type": "string", "example": "NG" }, "name": { "type": "string", "example": "Nigeria" } } } } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### Install QoreID on Expo React Native SDK53 Source: https://docs.qoreid.com/docs/qoreid-react-native-sdk Instructions for installing QoreID on Expo React Native SDK53, involving package deletion, import removal, dependency upgrades, and native configuration setup. ```groovy Step 1: Delete the following packages "expo-dev-client" (no longer required to run development build) "expo-splash-screen" (not required. Use SplashScreen from expo-router) Step 2: Remove any import of expo-dev-client in your code, usually index.js in your root dir Step 3: Upgrade expo and other packages run: npm i expo@latest && npx expo install --check run: npx expo prebuild --clean run: npx pod-install Step 4: Add your previous native configurations run: npm run ios ``` -------------------------------- ### Initialize QoreIDParams in Kotlin Source: https://docs.qoreid.com/docs/qoreidparams Demonstrates the initialization of QoreIDParams with required parameters like clientId and customerReference, and optional parameters like inputData. This is the primary method for setting up a verification session. ```kotlin val params:QoreIDParams = QoreIDParams() .clientId(key) .customerReference(id) .inputData(inputData) .build() ``` -------------------------------- ### Fix Xcode 15 Local Podspec Error (Shell) Source: https://docs.qoreid.com/docs/qoreid-flutter-sdk This shell script provides a workaround for a known issue with Xcode 15 and local podspecs, specifically when using the 'qoreidsdk'. It involves temporarily commenting out the SDK in `pubspec.yaml`, running `flutter pub get` and `pod install`, then uncommenting and repeating the install steps. ```shell # 1. Temporarily comment out qoreidsdk in pubspec.yaml # 2. Run: flutter pub get cd ios && pod install # 3. Uncomment qoreidsdk flutter pub get cd ios && pod install flutter run ``` -------------------------------- ### Launch QoreID Workflow with Java Source: https://docs.qoreid.com/docs/usage-examples-copy Launches a QoreID workflow using the provided client ID and input data for a specific service. Requires QoreIDParams.Builder and activityResultLauncher. ```java QoreIDParams qoreIDParams = new QoreIDParams.Builder() .clientId(clientId) .inputData( applicantData, addressData ) .forService("verifind") qoreIdButton .params(qoreIDParams) .registerForResult(activityResultLauncher) ``` -------------------------------- ### Launch QoreID Service in Collection Mode (Kotlin) Source: https://docs.qoreid.com/docs/usage-examples Launches a QoreID service verification in collection mode using Kotlin. This example shows how to set the client ID, input data, and specify a service product code for collection. The QoreID button is then configured with these parameters and registered for results. ```kotlin val qoreIDParams = QoreIDParams() .clientId(clientId) .inputData(InputData) .collection(productCode) // provide service product code qoreIdButton .params(qoreIDParams) .registerForResult(activityResultLauncher) ``` -------------------------------- ### Initialize QoreIDParam in Swift Source: https://docs.qoreid.com/docs/qoreidparam-ios Demonstrates the initialization and basic configuration of the QoreIDParam object in Swift. This includes setting the client ID, customer reference, and input data before building the final parameter object. ```swift let param:QoreIDParam = QoreIDParam() .clientId(clientId: key) .customerReference(id) .inputData(inputData) .build() ``` -------------------------------- ### Get Collection Verification Reports (OpenAPI JSON) Source: https://docs.qoreid.com/reference/get-collection-verification-reports This OpenAPI definition in JSON format describes the 'get-collection-verification-reports' endpoint. It specifies the request parameters such as collectionId, requestId, productCode, and customerReference, along with the structure of the successful 200 OK response, including example data for applicant, summary, status, and BVN details. ```json { "openapi": "3.1.0", "info": { "title": "baseurl", "version": "1.0" }, "servers": [ { "url": "https://api.qoreid.com" } ], "components": { "securitySchemes": { "sec0": { "type": "oauth2", "flows": {} } } }, "security": [ { "sec0": [] } ], "paths": { "/v1/api/collections/{collectionId}/products/{productCode}": { "get": { "summary": "Get collection verification reports", "description": "The endpoint fetch collection verification reports for a particular request in a collection", "operationId": "get-collection-verification-reports", "parameters": [ { "name": "collectionId", "in": "path", "description": "check qoreid portal to get the collectionID", "schema": { "type": "string" }, "required": true }, { "name": "requestId", "in": "query", "description": "NB: you don't have to provide both requestId and customerReference. Only either of the them is necessary", "schema": { "type": "string" } }, { "name": "productCode", "in": "path", "description": "input the productCode of the particular verification product you are using", "schema": { "type": "string" }, "required": true }, { "name": "customerReference", "in": "query", "description": "NB: you don't have to provide both requestId and customerReference. Only either of the them is necessary", "schema": { "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"id\": 4210,\n \"applicant\": {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"dob\": \"1960-10-01\",\n \"phone\": \"09011112345\",\n \"email\": \"no@gmail.com\",\n \"gender\": \"male\"\n },\n \"summary\": {\n \"bvn_check\": {\n \"status\": \"EXACT_MATCH\",\n \"fieldMatches\": {\n \"firstname\": true,\n \"lastname\": true,\n \"gender\": true,\n \"phoneNumber\": false,\n \"emailAddress\": false\n }\n }\n },\n \"status\": {\n \"state\": \"complete\",\n \"status\": \"verified\"\n },\n \"customerReference\": \"asaswewe23121\",\n \"bvn\": {\n \"bvn\": \"22222222222\",\n \"firstname\": \" John\",\n \"lastname\": \"Doe\",\n \"middlename\": \"Billon\",\n \"birthdate\": \"01-10-1960\",\n \"gender\": \"Male\",\n \"phone\": \"08100000000\",\n \"photo\": \"/9j/4AAQSkZJRg...\"\n }\n}" } }, "schema": { "type": "object", "properties": { "id": { "type": "integer", "example": 4210, "default": 0 }, "applicant": { "type": "object", "properties": { "firstname": { "type": "string", "example": "John" }, "lastname": { "type": "string", "example": "Doe" }, "dob": { "type": "string", "example": "1960-10-01" }, "phone": { "type": "string", "example": "09011112345" }, "email": { "type": "string", "example": "no@gmail.com" }, "gender": { "type": "string", "example": "male" } } }, "summary": { "type": "object", "properties": { "bvn_check": { "type": "object", "properties": { "status": { "type": "string", "example": "EXACT_MATCH" }, "fieldMatches": { "type": "object", "properties": { "firstname": { "type": "boolean" }, "lastname": { "type": "boolean" }, "gender": { "type": "boolean" }, "phoneNumber": { "type": "boolean" }, "emailAddress": { "type": "boolean" } } } } } } }, "status": { "type": "object", "properties": { "state": { "type": "string", "example": "complete" }, "status": { "type": "string", "example": "verified" } } }, "customerReference": { "type": "string", "example": "asaswewe23121" }, "bvn": { "type": "object", "properties": { "bvn": { "type": "string", "example": "22222222222" }, "firstname": { "type": "string", "example": " John" }, "lastname": { "type": "string", "example": "Doe" }, "middlename": { "type": "string", "example": "Billon" }, "birthdate": { "type": "string", "example": "01-10-1960" }, "gender": { "type": "string", "example": "Male" }, "phone": { "type": "string", "example": "08100000000" }, "photo": { "type": "string", "example": "/9j/4AAQSkZJRg..." } } } } } } } } } } } } } ``` -------------------------------- ### Auto-trigger QoreID Button with Custom Button Source: https://docs.qoreid.com/docs/qoreid-web-sdk This JavaScript code snippet demonstrates how to trigger the QoreID SDK's verification process using a custom button click event. It defines a function `popupSdk` that calls `window.QoreIdRegenerateSDK()` and then attempts to start the SDK. An event listener is attached to a button with the ID 'customQoreIDButton' to invoke this function. ```javascript const popupSdk = () => { window && window.QoreIdRegenerateSDK(); const sdkInstance = window.QoreIDWebSdk; if (sdkInstance) { sdkInstance.start(); } else { console.warn("QoreIDWebSdk is not available"); } }; const customButton = document.getElementById("customQoreIDButton"); customButton.addEventListener("click", popupSdk); ```