gali8 / Tesseract-OCR-iOS

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64.
http://www.nexor.it
MIT License
4.22k stars 949 forks source link

UIImage (G8Filters) missing at runtime (SOLVED) #144

Closed mdenty closed 9 years ago

mdenty commented 9 years ago

I write this little text for anyone that may have the same issue.

I used to put TesseractOCR.framework as an embedded framework in my project. Since iOS7 does not support embedded frameworks, I've decided to put TesseractOCR as "normal" framework. My project built and linked without problem, but at runtime I use - (UIImage *)g8_blackAndWhite; method of UIImage (G8Filters) category and I got something like:

reason: '-[UIImage g8 blackAndWhite]: unrecognized selector sent to instance

I solved the problem by setting GENERATE_MASTER_OBJECT_FILE = YES in the Tesseract OCR IOS.xcodeproj build settings.

It may be worth setting this flag in the git file, since the framework does not have so many .m files, it should not be a great overhead in size.

kevincon commented 9 years ago

Thanks for this note, @mdenty. Actually, could you move this to the installation page in the Wiki as a new section about using the library as a non-embedded framework? I think you should be able to edit it as a public user, but let me know if you have any issues with it: https://github.com/gali8/Tesseract-OCR-iOS/wiki/Installation