我有简单的ksh脚本,它运行carthage update --platform iOS
作为Build pre-action,它在更新到Xcode 10后开始失败。在Terminal中运行命令会成功生成Carthage
文件夹。
要重现此问题,请退出Xcode并删除DerivedData
和Carthage
文件夹。然后打开Xcode 10并尝试构建。
我得到的错误:
<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
指向Alamofire 4.7.3carthage bootstrap
,没有用env -i
建议使用open Carthage ticket,没有用xcodebuild
,found in this answer.这会强制您编写自己的carthage update
,由checkout和build组成。只有此选项可用作Xcode Build预执行步骤。 The solution was tested.对我有用的解决方案是在执行carthage更新之前取消设置来自XCode 10的一个env变量:
取消设置LLVM_TARGET_TRIPLE_SUFFIX
迦太基更新
我发现了一种实际上可以解决这个问题的方法:
在carthage update命令之后写一个有效的命令write
请遵循以下清单:
sudo xcode-select -s <path to Xcode 10.1>/Contents/Developer
chmod 777 <path-to-script-file>
carthage update
命令之后写一个有效的命令写,例如echo succeed
(这实际上是诀窍):
经过测试的环境:
Carthage 0.31.2
Xcode 10.1
工作演示
https://github.com/MojtabaHs/Carthage-WorkingDemo
请注意,这只是围绕问题解释的问题,而不是所有的迦太基问题。