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

Cannot Build SwiftOCR with Swift 4.2 #158

Open
flxschmidt opened this issue Feb 5, 2019 · 4 comments
Open

Cannot Build SwiftOCR with Swift 4.2 #158

flxschmidt opened this issue Feb 5, 2019 · 4 comments

Comments

@flxschmidt
Copy link

flxschmidt commented Feb 5, 2019

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 flxschmidt changed the title #if TARGET_OS_SIMULATOR Cannot Build SwiftOCR, Error with Compiler Flags at UIImageOrientation Feb 9, 2019
@flxschmidt flxschmidt changed the title Cannot Build SwiftOCR, Error with Compiler Flags at UIImageOrientation Cannot Build SwiftOCR with Swift 4.2 Feb 9, 2019
@mark-bragg
Copy link

any update?

1 similar comment
@uponup
Copy link

uponup commented Feb 27, 2020

any update?

@Topwiz
Copy link

Topwiz commented Apr 21, 2020

Try changing it to UIImageOrientation.up

@JorgeZapata27
Copy link

Updates? Many thanks!

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

5 participants