henrinormak / Heimdall

Heimdall is a wrapper around the Security framework for simple encryption/decryption operations.
MIT License
401 stars 68 forks source link

compile error with Carthage #53

Closed Jake6329 closed 7 years ago

Jake6329 commented 7 years ago

I'm having trouble using the framework with Carthage. I added this line to the file Cartfile:

github "henrinormak/Heimdall"

And the ran carthage update, but I got compilation errors. The error message starts with this:

*** Fetching Heimdall
*** Checking out Heimdall at "1.1.0"
*** xcodebuild output can be found in /var/folders/xv/4249pm313xzftn13dv3ncb940000gn/T/carthage-xcodebuild.fb2uap.log
*** Building scheme "Heimdall-TVOS" in Heimdall.xcodeproj
/Users/jakelim/git/local/PrivacyGuard/Carthage/Checkouts/Heimdall/Heimdall/Heimdall.swift:40:1: error: expressions are not allowed at the top level
/Users/jakelim/git/local/PrivacyGuard/Carthage/Checkouts/Heimdall/Heimdall/Heimdall.swift:40:5: error: consecutive statements on a line must be separated by ';'
/Users/jakelim/git/local/PrivacyGuard/Carthage/Checkouts/Heimdall/Heimdall/Heimdall.swift:41:5: error: expected declaration
/Users/jakelim/git/local/PrivacyGuard/Carthage/Checkouts/Heimdall/Heimdall/Heimdall.swift:41:16: error: consecutive declarations on a line must be separated by ';'

The line 40 in Heimdall.swift starts with the keyword open which is introduced in Swift 3. It seems that Heimdall-TVOS target is still configured to use the legacy Swift syntax, and the Xcode build settings show this as in the screenshot below.

screen shot 2016-10-29 at 5 44 13 pm

To me, it looks like the build setting is the cause of the problem. I'm not sure if there could be further issues. Can this be fixed?

henrinormak commented 7 years ago

Investigating, currently in the xcode-tweaks branch, but will likely merge once sorted.

henrinormak commented 7 years ago

Should be fixed in 1.1.2 (i.e master), please verify.