Enable OCR VIN support
How to enable #
OCR support currently only makes sense when scanning for VIN codes. barKoder SDK is mainly for scanning barcodes so we've focused our efforts on those cases (VIN).
To enable OCR VIN for barKoder SDK
- Ensure you're using a license key that has OCR enabled.
- Enable OCR in the decoder configuration:
guard let decoderConfig = barkoderView.config?.decoderConfig else { return } // Enable OCR functionality
decoderConfig.setcustomOption("enable_ocr_functionality", value: 1) // Enable OCRText symbology
decoderConfig.ocrText.enabled = true // Optional: enable other barcode types alongside OCR
decoderConfig.code39.enabled = true // enableVINRestrictions (only decode VIN-compliant barcodes / strings)
decoderConfig.enableVINRestrictions = true