carthage build --no-skip-current --platform tvOS.Expected the schemes of all dependencies to build successfully for tvOS platform, including PactConsumerSwift tvOS.
Build for _PactConsumerSwift tvOS_ (current) failed!
$ carthage build --no-skip-current --platform tvOS
*** xcodebuild output can be found in /var/folders/f0/pn2b1l6d1c76jhl28q79m6sc0000gn/T/carthage-xcodebuild.zYpnhj.log
*** Building scheme "Alamofire tvOS" in Alamofire.xcworkspace
*** Building scheme "Nimble-tvOS" in Nimble.xcodeproj
*** Building scheme "Quick-tvOS" in Quick.xcworkspace
*** Building scheme "Result-tvOS" in Result.xcodeproj
*** Building scheme "BrightFutures-tvOS" in BrightFutures.xcworkspace
*** Building scheme "PactConsumerSwift tvOS" in PactConsumerSwift.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Developer/pact-consumer-swift/PactConsumerSwift.xcodeproj -scheme PactConsumerSwift\ tvOS -configuration Release -sdk appletvos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build (launched in /Developer/pact-consumer-swift)
The last few lines in the log:
/Developer/pact-consumer-swift/Sources/MockService.swift:60:25: error: use of undeclared type 'FileString'
open func run(_ file: FileString? = #file, line: UInt? = #line, timeout: TimeInterval = 30,
^~~~~~~~~~
/Developer/pact-consumer-swift/Sources/MockService.swift:81:50: error: use of undeclared type 'FileString'
func failWithLocation(_ message: String, file: FileString?, line: UInt?) {
^~~~~~~~~~
/Developer/pact-consumer-swift/Sources/MockService.swift:90:43: error: use of undeclared type 'FileString'
file: FileString?,
^~~~~~~~~~
/Developer/pact-consumer-swift/Sources/MockService.swift:68:9: error: use of unresolved identifier 'fail'
fail("Error setting up pact: \(error.localizedDescription)")
^~~~
/Developer/pact-consumer-swift/Sources/MockService.swift:83:7: error: use of unresolved identifier 'fail'
fail(message, file: fileName, line: lineNumber)
^~~~
/Developer/pact-consumer-swift/Sources/MockService.swift:85:7: error: use of unresolved identifier 'fail'
fail(message)
^~~~
** BUILD FAILED **
List the software versions you're using:
Xcode Default.)Please also mention which package manager you used and its version. Delete the
other package managers in this list:
pod --version in Terminal)carthage version in Terminal)swift build --version in Terminal)This is related to https://github.com/Carthage/Carthage/issues/1268 and https://github.com/Carthage/Carthage/pull/1280. You should need to add ENABLE_BITCODE=NO as a User-Defined build setting on your tvOS target. Please read that issues for the details.
Ah, right. I gave it a crack and it builds now. Thanks for pointing it out.
To elaborate on how to make it build successfully, tvOS target doesn't have ENABLE_BITCODE setting in the _Build Settings_ tab by default (iOS on the other hand does have it there already). Needed to add it manually through _Editor > Add Build Setting > Add User-Defined Setting_.