百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

blinkid-react-native

> 前端框架
开源

使用 ReactNative 构建的跨平台应用程序的 ID 扫描。

188 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

使用 ReactNative 构建的跨平台应用程序的 ID 扫描。

BlinkID React Native plugin

The BlinkID SDK is a comprehensive solution for implementing secure document scanning in React Native cross-platform applications. It offers powerful capabilities for capturing and analyzing a wide range of identification documents. The React Native plugin wraps the native BlinkID SDK and BlinkID UX modules, providing a complete, ready-to-use scanning experience with a user-friendly interface.

Please note that, for maximum performance and full access to all features, it’s best to go with one of our native SDKs (for iOS or Android).

However, since the wrapper is open source, you can add the features you need on your own.

Current version: @microblink/[email protected] (BlinkID SDK v8001).
If you are upgrading from v8000, see What's new in v8001.
If you are upgrading from v7.x, see Migrating from v7.x (then apply the v8001 notes).

Table of contents

  • Licensing
  • Requirements
  • Quickstart with the sample application
    • Android sample application
      • On an emulator
      • On a physical device via USB
    • iOS sample application
  • Plugin integration
    • Android setup
    • iOS setup
    • Permissions
  • Plugin usage
    • Imports and license key
    • Configure scanning modules
    • Default BlinkID UX (camera scanning)
    • BlinkID DirectAPI (static images)
    • Document redaction
  • Plugin specifics
    • Scanning methods
    • SDK loading & unloading
    • BlinkID settings
    • BlinkID results
  • What's new in v8001
  • What's new in v8000
    • Migrating from v7.x
  • Additional information and Support

Licensing

A valid license key is required to initialize the BlinkID plugin.

A free trial license key can be requested after registering at the Microblink Developer Hub.

Requirements

BlinkID React Native v8001 was built and tested with React Native v0.82.x

  • The BlinkID React Native SDK is also compatible with React Native applications running on the old architecture as it contains backward compatibility with Native Module implementation.

For additional help with React-Native setup, view the official documentation here.

Device requirements

The BlinkID React Native plugin requires:

  • iOS version 16.0 and above
  • Android API version 24 and above

For more detailed information about the BlinkID Android and iOS requirements, view the native SDK documentation here (Android & iOS).

Quickstart with the sample application

The sample application demonstrates how the BlinkID plugin is implemented and shows how to configure scanning modules and obtain results.

It contains the implementation for:

  1. Default BlinkID UX scanning — camera-based scanning with configurable modules.
  2. Multiside DirectAPI scanning — extracting document information from two static images (from the gallery).
  3. Singleside DirectAPI scanning — extracting document information from a single static image (from the gallery).

The sample also includes a module settings panel where you can toggle and configure the document capture, barcode, MRZ, and VIZ modules, along with optional class filters and redaction settings.

To obtain and run the sample application, follow the steps below. Make sure you have Node & Watchman installed before running the sample application:

bash
# install Watchman
brew install watchman

# install Node
brew install node

To install & run the sample application:

  1. Git clone the repository:
bash
git clone https://github.com/microblink/blinkid-react-native.git
  1. Position to the obtained blinkid-react-native folder
bash
cd blinkid-react-native
  1. Run the initBlinkIdReactNativeSample.sh script to create a sample app, with required configurations applied.
bash
./initBlinkIdReactNativeSample.sh
  1. After the script finishes running, position to the BlinkIdSample folder.

Android sample application

Running the sample application on Android

On an emulator:

  1. Execute the following command:
bash
npx react-native start
  1. In another terminal, run:
bash
npx react-native run-android

Alternative: Run directly via Android Studio:

  1. Execute the following command:
bash
npx react-native start
  1. Open the android folder via Android Studio in the BlinkIdSample folder to run the Android sample application.

On a physical device via USB:

  1. Connect your device via USB and enable USB debugging in Developer Options.
  2. Forward the Metro bundler port:
bash
adb reverse tcp:8081 tcp:8081
  1. Start Metro in one terminal:
bash
npx react-native start
  1. In another terminal, build and run on the device:
bash
npx react-native run-android

or open it in Android Studio and run it on the physical device from there.

iOS sample application

Running the sample application on iOS

  1. For running the sample application on iOS, execute the following command:
bash
npx react-native start
  1. Open the BlinkIdSample.xcworkspace located in the ios folder
  2. Set your development team
  3. Press run

Plugin integration

  1. To add the BlinkID plugin to a React Native project, first create an empty project if needed:
bash
npx @react-native-community/cli init YourAppName --package-name YourPackageName --title YourAppTitle --version "0.82.0"
  1. Install the @microblink/blinkid-react-native dependency:
bash
npm install --save @microblink/[email protected]
  1. Complete the platform-specific setup below.

Android setup

Add Maven Central to your project repositories.

In android/settings.gradle (or your root build.gradle, depending on your React Native version):

groovy
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

Ensure your app uses Kotlin v2.2.21 or newer, minSdkVersion 24 or newer, and compileSdkVersion 36 or newer. Use the Android Gradle Plugin and Gradle versions shipped with your React Native release (for example, React Native 0.82.x uses AGP 8.12 and Gradle 9.0).

blinkid-ux ships its Compose-based scanning UI as a precompiled AAR, so client apps do not need to enable the Compose compiler plugin, buildFeatures.compose, or a Compose BOM unless they compile their own Compose code.

Set the Kotlin version in your project-level android/build.gradle:

groovy
buildscript {
    ext {
        kotlinVersion = "2.2.21"
    }
}

The sample initialization script (initBlinkIdReactNativeSample.sh) contains the complete, tested Android configuration if you need a reference implementation.

iOS setup

  1. Set the minimum iOS deployment target to 16.0 in your ios/Podfile:
ruby
platform :ios, '16.0'
  1. Install pods:
bash
cd ios && pod install

The plugin ships with vendored BlinkID.xcframework and BlinkIDUX.xcframework frameworks.

Permissions

Add the required usage descriptions to your app:

iOS — in Info.plist:

xml
NSCameraUsageDescription
Camera access is required for document scanning

If you use DirectAPI with images from the photo library, also add:

xml
NSPhotoLibraryUsageDescription
Photo library access is required for document image upload

Android — camera permission is typically merged from the BlinkID UX library. If needed, add to AndroidManifest.xml:

xml

Plugin usage

Note: The plugin usage process can be found in the sample app App.tsx file here.

Imports and license key

After adding the blinkid-react-native dependency, import the API and set your platform-specific license key:

typescript
import { Platform } from 'react-native';
import {
  performScan,
  performDirectApiScan,
  loadBlinkIdSdk,
  unloadBlinkIdSdk,
  refreshLicenseLease,
  CountryID,
  DocumentTypeID,
  RegionID,
  type BlinkIdScanningResult,
  type BlinkIdSdkSettings,
  type BlinkIdSessionSettings,
  type BlinkIdScanningSettings,
  type BlinkIdScanningUxSettings,
} from '@microblink/blinkid-react-native';

const licenseKey = Platform.select({
  ios: 'your-ios-key',
  android: 'your-android-key',
})!;

All settings are plain objects. You do not need class constructors.

Use CountryID / RegionID / DocumentTypeID for class filters and redaction document filters. Nested Country / Region / DocumentType types ({ id?, rawValue }) appear only on scan results (documentClassInfo).

Configure scanning modules

Scanning behavior is configured through BlinkIdScanningSettings, which contains up to four module settings. Include only the modules you want to use — omitting a module disables it.

…

Module-only scanning examples:

  • Barcode only — include barcodeModule, omit mrzModule and vizModule.
  • Document capture only (similar to BlinkID Capture) — include only documentCaptureModule.

Note: When using PDF417 and QR barcode scanning, enable both pdf417ScanningEnabled and qrScanningEnabled together. The analyzer treats them as a combined detection stage.

For DirectAPI with pre-cropped document images, set documentCaptureModule.cropType to "cropped" (or "unknown" if cropping is uncertain). Camera scanning (performScan) must keep cropType: "not-cropped".

Module configuration helpers can be found in ScanningModulesConfig.ts.

Default BlinkID UX (camera scanning)

…

BlinkID DirectAPI (static images)

DirectAPI extracts data from Base64-encoded static images instead of using the camera UI.

  • Pass two images with scanningMode: 'automatic' (front side first, back side second).
  • Pass one image with scanningMode: 'single'.
  • Set documentCaptureModule.cropType to "cropped" when images are already cropped and perspective-corrected, or "unknown" when cropping is uncertain. Use "not-cropped" for raw photos.
…

Document redaction

Anonymization was renamed to redaction in v8000. For camera scanning, use a RedactionSettingsResolver to apply per-document redaction rules. For DirectAPI, pass a single RedactionSettings object.

…

Redaction modes: none, imageOnly, resultFieldsOnly, fullResult.

Plugin specifics

The BlinkID plugin implementation is located in the src folder here, while platform-specific implementation is located in the android and ios folders.

Scanning methods

Currently, the BlinkID plugin contains two main scanning methods: performScan and performDirectApiScan.

The performScan method

Launches the BlinkID scanning process with the default UX.

Recommended call style — single settings object:

typescript
performScan({

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++aiandroidcross-platformid-card-camera

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架