Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I install SwiftOCR #25

Closed
ecdfeaa2 opened this issue May 27, 2016 · 13 comments
Closed

How can I install SwiftOCR #25

ecdfeaa2 opened this issue May 27, 2016 · 13 comments

Comments

@ecdfeaa2
Copy link

Hello,
I opened this issue because I don't know how I can install this library.
Can you help me ?

@NMAC427
Copy link
Owner

NMAC427 commented May 27, 2016

First you have to drag the framework folder in your project folder. Then select the SwiftOCR.xcodeproj and drag it into your project navigator. Do the same thing with the ´GPUImage.xcodeproj´ or GPUImageMac.xcodeproj file located under SwiftOCR/GPUImage-master/framework.

bildschirmfoto 2016-05-27 um 18 20 34
bildschirmfoto 2016-05-27 um 18 20 52

After that you have to add SwiftOCR and GPUImage as an embedded binary.

bildschirmfoto 2016-05-27 um 18 21 21

bildschirmfoto 2016-05-27 um 18 21 52

The only thing left is to import SwiftOCR in the files in which you want to use it.

bildschirmfoto 2016-05-27 um 18 30 53

@NMAC427 NMAC427 closed this as completed May 27, 2016
@ecdfeaa2
Copy link
Author

Thanks

@maccesch
Copy link

maccesch commented Oct 1, 2016

This is a great guide. Would you mind putting this into the README?

@ban9ban3
Copy link

I can't install SwiftOCR in xcode 8. Any help? Thanks.

@toddwilson7
Copy link

Try this this:

Import Swift OCR

First you have to drag the framework folder in your project folder. Then select theSwiftOCR.xcodeproj and drag it into your project navigator. Do the same thing with the ´GPUImage.xcodeproj´ or GPUImageMac.xcodeproj file located under SwiftOCR/GPUImage-master/framework.

After that you have to add SwiftOCR and GPUImage as an embedded binary.

The only thing left is to import SwiftOCR in the files in which you want to use it.

First you have to drag the framework folder in your project folder. Then select theSwiftOCR.xcodeproj and drag it into your project navigator. Do the same thing with the ´GPUImage.xcodeproj´ or GPUImageMac.xcodeproj file located under SwiftOCR/GPUImage-master/framework.

After that you have to add SwiftOCR and GPUImage as an embedded binary.

The only thing left is to import SwiftOCR in the files in which you want to use it.

Sent from my iPhone

On Nov 15, 2016, at 8:55 PM, Bạn Nguyễn Ngọc notifications@github.com wrote:

I can't install SwiftOCR in xcode 8. Any help? Thanks.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@ban9ban3
Copy link

I allready do that
screen shot 2016-11-16 at 9 59 20 am

but get this error:

screen shot 2016-11-16 at 9 59 04 am

@billysoboles2
Copy link

Something has gone badly wrong with either these instructions or the code, I have tried to install this with all sorts of different configurations, dragging the frameworks folder to finder folder of the project, dragging to Xcode above and below folder, into and out of here there and everywhere, dragging xcodeproj' s here there and everywhere and the least errors I can get is 2, the most is about 300.....When it's down to 2 they are: - warning: using 'ALWAYS_SEARCH_USER_PATHS = YES' while building targets which define modules ('DEFINES_MODULE = YES') may fail. Please migrate to using 'ALWAYS_SEARCH_USER_PATHS = NO'. ----- and ----- “Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly. ----- Which I have gone round in circles to try and sort out. Given up after around 7 hours of life wasted... Back to Tesseract.

@NMAC427
Copy link
Owner

NMAC427 commented Dec 4, 2016

@billysoboles2 I've just pushed a new SwiftOCR version. Could you please try it again with this newer version?

@saurabh143
Copy link

saurabh143 commented Dec 15, 2016

I Have tried all the above, tried in xcode 7.3.1 and xcode 8.0 as well.
Still not able to build.
I am getting 168 errors currently in the project.

screen shot 2016-12-16 at 1 27 56 am

@EkambaramE
Copy link

I'm also having the same problem to integrate SwiftOCR someone guide me to integrate into Xcode 8.2

screen shot 2017-01-09 at 11 01 15 pm
screen shot 2017-01-09 at 11 01 26 pm

@saurabh-360
Copy link

saurabh-360 commented Jan 9, 2017

SwiftOCR-8.2

Steps to start

  1. Make a new project in Xcode 8.2
  2. Copy the frameworks folder from this repository, or from the original repo you find here https://github.com/garnele007/SwiftOCR.

Framework

  1. Paste it in your projct folder(right where you find the .xcodeproj file).

  2. Go inside the frameworks folder, you will find three files

1. SwiftOCR.xcodeproj 
2. SwiftOCR(folder)
3. SwiftOCRTests(folder)

Building the project with SwiftOCR

  1. Drag and drop the SwiftOCR.xcodeproj file into your project inside the project (Make sure you do not create the workspace, this happens if you drop the file outside the project)

pasteswiftocr

  1. Now go to frameworks->SwiftOCR->GPUImage-master->framework, you will find GPUImage.xcodeproj there.
  2. Drag and drop this file too into the project.
    gpuimagepaste

The tricky part, Adding frameworks

  1. Go to targets->General scroll down to Embedded Binaries
  2. Click +Add
  3. Type GPUImage.framework, select the one that is outside the scope of you project (having iOS)

selectgpuimage

  1. Click +Add again, and type Swiftocr.framework, and select again the one with iOS.

selectswiftocr

  1. import SwiftOCR in before using it.
  2. That's all, you will be able to build

I have successfully build a project, you can refer my repo

https://github.com/saurabh-360/SwiftOCR-8.2

@Klavar
Copy link

Klavar commented Sep 6, 2017

Hi, is there a way to detect spaces with swift ocr, I am using at at the moment and it doesn't add spaces and also cannot find 1 in the text.

@adavidov972
Copy link

I'm getting this error while importing Swiftocr -> "Cannot load module 'SwiftOcr' as 'SwiftOCR'"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests