NEWSMRZ Scanner is now part of barKoder.What it means for you →

DOCUMENTATION

Installation guide

MRZ Scanner 1.x (archive) / React Native

Documentation / MRZ Scanner 1.x (archive) / React Native

On this page

 

 1. Add the module with typing the following command in the terminal (skip if previously executed) :

 

$cd Project/Dir

$yarn add react-native-mrzscannerlib


Android


 1. Add the following code with flatDir in pathToYourApp/android/build.gradle:

allprojects {
repositories {
   flatDir { dirs "$rootDir/../node_modules/react-native-mrzscannerlib/android/mrzlibs" }
  }
}

 

iOS


 

 1. Disable bitcode. Your app will immediately generate an error if you try and run with an Enable Bitcode.

 

image51.png

 

  2. The scanner uses your phone camera, automatically requires a permission to access your camera.

 

      Add the key/value pairs for camera usage description:

     -key: NSCameraUsageDescription.

     -value: value: MRZ Scanner requires using camera.

 

image41.png

Updated Jun 17, 2024 · Questions? Ask us