khjde1207 / tesseract_ocr

Tesseract OCR for flutter
BSD 3-Clause "New" or "Revised" License
64 stars 33 forks source link

assets file working on IOS Emulator Not on Physical device #7

Closed sikandernoori closed 3 years ago

sikandernoori commented 3 years ago

Hello @khjde1207 Placing tessdata folder under assets folder does not work, it gives following error

flutter: /var/mobile/Containers/Data/Application/0900C698-99AD-4D93-BFEA-661985250E38/Library/Caches/test.jpg
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “tessdata” in the folder “XXXX”." UserInfo={NSFilePath=/private/var/containers/Bundle/Application/DABD394C-FB08-40B1-9FE4-D444B11E55C8/Runner.app/tessdata, NSUnderlyingError=0x283266010 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
Error opening data file /private/var/containers/Bundle/Application/DABD394C-FB08-40B1-9FE4-D444B11E55C8/Runner.app/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'

the way around to add tessdata folder at root on runner folder too using XCode as mentioned here

khjde1207 commented 3 years ago

If you can solve it, can you make a pull request?

sikandernoori commented 3 years ago

Sounds Good. I'll update and share it with you

khjde1207 commented 3 years ago

https://github.com/khjde1207/tesseract_ocr/pull/10 has this been fixed?

sikandernoori commented 3 years ago

Not yet. Also I am redoing the whole plugin. So I won't be sending more pull requests.