SwiftOCR icon indicating copy to clipboard operation
SwiftOCR copied to clipboard

Cannot Build SwiftOCR with Swift 4.2

Open flxschmidt opened this issue 6 years ago • 4 comments

I cannot build SwiftOCR in Xcode 10.1 for the following Target:

  • Swift 4.2
  • iOS 12.1

It is a fully clear project with SwiftOCR as the one and only pod dependency

It breaks on the Swift 4.2 changes: 'UIImageOrientation' has been renamed to 'UIImage.Orientation' because Xcode don't checks the compiler flags

#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE let orientationUp = UIImage.Orientation.up #else //GPUImage is using a re-definition of the UIImageOrientation for Mac compilation let orientationUp = UIImageOrientation.up #endif

It breaks on Simulator and real device. I'd just researched that in Google and I've found that the flag #if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE is for ObjectiveC? https://stackoverflow.com/questions/36180702/whats-wrong-with-my-if-target-os-simulator-code-for-realm-path-definition

How can I build my project? Thanks in advance!

flxschmidt avatar Feb 05 '19 19:02 flxschmidt

any update?

mark-bragg avatar Mar 25 '19 00:03 mark-bragg

any update?

uponup avatar Feb 27 '20 15:02 uponup

Try changing it to UIImageOrientation.up

Topwiz avatar Apr 21 '20 02:04 Topwiz

Updates? Many thanks!

JorgeZapata27 avatar Apr 30 '20 18:04 JorgeZapata27