我有一个简单的ksh脚本,运行
为了重现这个问题,请退出Xcode并删除
我收到的错误信息如下:
carthage update --platform iOS
作为构建前操作,在升级到Xcode 10后它开始失败。
在终端中运行该命令可以成功生成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
安装
- Carthage 0.31.1 - 0.33.0
Cartfile
指向 Alamofire 4.7.3
尝试过的方法
- 使用
carthage bootstrap
,但不起作用 - 将Alamofire依赖目标提高到iOS 8.4和10(来自本地分支),但不起作用
- 所有此SO问题中的答案都不起作用
- 像打开Carthage工单建议的那样使用
env -i
,但不起作用
解决方案
- 第一次构建时选择“通用iOS设备”。
- 直接向
xcodebuild
传递SDK参数,在此答案中找到。这迫使您编写自己的carthage update
,由checkout和build组成。只有这个选项作为Xcode Build预操作步骤才有效。该解决方案已进行测试。