@thoguet/react-native-text-recognition
v1.1.4
Published
text recognition utilizing the Vision framework on iOS and Firebase ML on Android
Downloads
9
Readme
React-Native-Text-Recognition
Very basic text recognition utilizing Firebase ML for both iOS and Android
Installation
yarn add react-native-text-recognition@mlor with NPM:
npm install react-native-text-recognition@mlAndroid
When using a version >= 1.1.0 Android is using MLKit v2 Beta, which simply means that you do not need Google Play services to use MLKit. If you want your app binary to be smaller and are sure that all devices installing the app will have Google Play, use version 1.0.1.
iOS:
If you get an error about "Could not find or use auto-linked library 'xxxxx'" then add the following to your project's Build Settings under LIBRARY_SEARCH_PATHS:
"$(SDKROOT)/usr/lib/swift"This error is most common on XCode 12+
Usage
import TextRecognition from 'react-native-text-recognition';
// pass the image's path to recognize
const result = await TextRecognition.recognize('/var/mobile/...');Android:
If you are using react-native-camera and not getting good reads back, set fixOrientation: true in the settings for takePictureAsync. This will cause a noticable delay in processing but fix the issue. This is most common (for me) on OnePlus phones.
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
