I have simple ksh script which runs
carthage update --platform iOS
as a Build pre-action and it started to fail after updating to Xcode 10.
Running the command in Terminal generates Carthage
folder successfully.
To reproduce this issue, quit Xcode and delete DerivedData
and Carthage
folder. Then open Xcode 10 and try to build.
The error I get:
<unknown>:0: error: unable to load standard library for target 'arm64-apple-ios8.0-simulator'
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal armv7
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(4 failures)
Build Failed
Cartfile
points to Alamofire 4.7.3carthage bootstrap
, didn't workenv -i
as advised in open Carthage ticket, didn't workxcodebuild
, found in this answer. This forces you to write your own carthage update
, composed of checkout and build. Only this option worked as Xcode Build pre-action step. The solution was tested.The solution that worked for me was to unset one of the env variables coming from XCode 10 just before executing carthage update:
unset LLVM_TARGET_TRIPLE_SUFFIX
carthage update