Install Tesseract OCR iOS via Carthage
masterTo integrate Tesseract OCR iOS into your project using Carthage, add the repository to your Cartfile and run the update command.
github "gali8/Tesseract-OCR-iOS"carthage updaterepository·master·Indexed 26 days ago
https://github.com/gali8/tesseract-ocr-iosA library for integrating Tesseract OCR capabilities into iOS 9.0+ projects written in Objective-C or Swift. It bundles Tesseract, Leptonica, and image libraries (Libtiff, Libpng, Libjpeg) with bitcode support. Includes instructions for installation via Carthage and manual compilation of libraries for various iOS and simulator architectures.
To integrate Tesseract OCR iOS into your project using Carthage, add the repository to your Cartfile and run the update command.
github "gali8/Tesseract-OCR-iOS"carthage updateTo compile the dependent libraries (png, jpeg, tiff, leptonica) and Tesseract for iOS/simulator architectures, run make inside the TesseractOCR subfolder.
This process generates the following files and directories:
libpng.alibjpeg.alibtiff.alibtesseract.aliblept.ainclude directories for leptonica, tesseract, and image libraries.The resulting files are automatically copied into the lib and include directories inside the TesseractOCR directory. The initial full build may take approximately 30 minutes.
Before building the libraries, ensure you have the following tools installed on your system:
By default, the build produces a "fat" library containing all architectures (arm7, arm7s, arm64, i386, x86_64) for both devices and simulators.
If you need to limit the architectures (for example, for App Store submission), set the ARCHS environment variable before running make.
export ARCHS=armv7, armv7s, arm64tessdata. Ensure this folder is included in your project bundle and correctly referenced to avoid errors.