SwiftOCR icon indicating copy to clipboard operation
SwiftOCR copied to clipboard

How to install this library?

Open westofpluto opened this issue 7 years ago • 3 comments

I am having massive problems installing this. Here's what I did. I have Xcode 7.3.1. I git cloned the repo onto my Mac, then went into example/iOS/SwiftOCR Camera, double clicked on the xcodeproj file. GPUImageFramework shows a CodeSign error: code signing is required for product type Framework in iOS 9.3 SwiftOCR throws 25 errors in SwiftOCRTraining.swift, mostly syntax errors like "consecutive declarations on a line must be separated by a ;" but also "No such module GPUImage"

How can I fix this?

westofpluto avatar May 01 '17 20:05 westofpluto

I also saw those syntax errors running Xcode 7 - I upgraded to Xcode 8 and they went away. I think the underlying issue is the project needs to compile with Swift 3, and Xcode 7 is using Swift 2.

I don't know about CodeSign because I'm only using the mac version, but I think you can change the signing stuff under the project's build settings (click on the .xcodeproj file in the sidebar and then 'build settings' is one of the tabs in that view).

DiSharko avatar May 15 '17 02:05 DiSharko

I would just incorporate it using CocoaPods.

  1. "pod init" (in your project directory)
  2. Add this to your podfile: pod 'GPUImage', :git => 'https://github.com/BradLarson/GPUImage.git' pod 'SwiftOCR', :git => 'https://github.com/garnele007/SwiftOCR.git'
  3. Save and run "pod install"

joe-bruno avatar Jul 31 '17 17:07 joe-bruno

When you install using cocoapods, how do you replace the OCR neural network? Just Show In Finder and replace the existing OCR-Network file? Wouldn't it then be overwritten anytime you update pods?

ColdLogical avatar Oct 13 '17 18:10 ColdLogical