Skip to content

Commit

Permalink
ONLY_ACTIVE_ARCH YES
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniele authored and Daniele committed May 2, 2014
1 parent e6de5b8 commit 4034d80
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@protocol TesseractDelegate <NSObject>
@optional
- (void)progressImageRecognitionForTesseract:(Tesseract*)tesseract;
- (BOOL)shouldCancelImageRecognitionForTesseract:(Tesseract*)tesseract;
@end

Expand Down
Binary file modified Products/TesseractOCR.framework/Versions/A/Resources/Info.plist
Binary file not shown.
Binary file modified Products/TesseractOCR.framework/Versions/A/TesseractOCR
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ -(void)recognizeImageWithTesseract:(UIImage *)img
tesseract = nil; //deallocate and free all memory
}

//DD TODO
/*
- (void)progressImageRecognitionForTesseract:(Tesseract*)tesseract {
NSLog(@"progress: %d", tesseract.progress);
}
*/

- (BOOL)shouldCancelImageRecognitionForTesseract:(Tesseract*)tesseract {
NSLog(@"progress: %d", tesseract.progress);
return NO; // return YES, if you need to interrupt tesseract before it finishes
Expand Down
2 changes: 1 addition & 1 deletion Tesseract OCR iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
ONLY_ACTIVE_ARCH = YES;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"-ObjC",
"-lstdc++",
Expand Down
1 change: 1 addition & 0 deletions TesseractOCR/Tesseract.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@protocol TesseractDelegate <NSObject>
@optional
- (void)progressImageRecognitionForTesseract:(Tesseract*)tesseract;
- (BOOL)shouldCancelImageRecognitionForTesseract:(Tesseract*)tesseract;
@end

Expand Down
13 changes: 10 additions & 3 deletions TesseractOCR/Tesseract.mm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ - (id)initPrivateWithDataPath:(NSString *)dataPath language:(NSString *)language
_language = language;

_monitor = new ETEXT_DESC();
_monitor->cancel = (CANCEL_FUNC)[self methodForSelector:@selector(tesserackCallbackFunction:)];
_monitor->cancel = (CANCEL_FUNC)[self methodForSelector:@selector(tesseractCancelCallbackFunction:)];
_monitor->cancel_this = (__bridge void*)self;

_variables = [[NSMutableDictionary alloc] init];
Expand Down Expand Up @@ -243,7 +243,6 @@ - (NSString *)recognizedText {
}

- (short)progress {

return _monitor->progress;
}

Expand All @@ -260,7 +259,15 @@ - (BOOL)recognize {
return (returnCode == 0) ? YES : NO;
}

- (BOOL)tesserackCallbackFunction:(int)words {
- (void)tesseractProgressCallbackFunction:(int)words {

SEL selector = @selector(progressImageRecognitionForTesseract:);

if([self.delegate respondsToSelector:selector])
[self.delegate progressImageRecognitionForTesseract:self];
}

- (BOOL)tesseractCancelCallbackFunction:(int)words {

if (_monitor->ocr_alive == 1)
_monitor->ocr_alive = 0;
Expand Down
4 changes: 2 additions & 2 deletions TesseractOCR/TesseractOCR-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.21</string>
<string>2.22</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.21</string>
<string>2.22</string>
<key>CFPlugInDynamicRegisterFunction</key>
<string></string>
<key>CFPlugInDynamicRegistration</key>
Expand Down
10 changes: 5 additions & 5 deletions TesseractOCRiOS.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Pod::Spec.new do |s|
s.name = 'TesseractOCRiOS'
s.version = '2.21'
s.version = '2.22'

s.summary = 'It helps you to use OCR in iOS projects, writing Objective-C. Easy and fast.'

s.homepage = 'https://code.google.com/p/tesseract-ocr/'
s.documentation_url = 'https://code.google.com/p/tesseract-ocr/wiki/FAQ'
s.homepage = 'https://github.com/gali8/Tesseract-OCR-iOS'
s.documentation_url = 'https://github.com/gali8/Tesseract-OCR-iOS/blob/master/README.md'

s.license = 'MIT'
s.author = { 'Daniele Galiotto' => '' }
s.source = { :git => 'https://github.com/gali8/Tesseract-OCR-iOS', :branch => "podspec" }
s.author = { 'Daniele Galiotto' => '[email protected]' }
s.source = { :git => 'https://github.com/gali8/Tesseract-OCR-iOS', :branch => "master" }

s.platform = :ios, '5.0'
s.source_files = 'Classes'
Expand Down

0 comments on commit 4034d80

Please sign in to comment.