【发布时间】:2019-03-29 23:33:27
【问题描述】:
我有一个简单的 ksh 脚本可以运行
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
设置
- 迦太基 0.31.1 - 0.33.0
-
Cartfile指向 Alamofire 4.7.3
我尝试过的事情
- 使用
carthage bootstrap,不起作用 - 将 Alamofire 依赖目标提升到 iOS 8.4 和 10(从本地分支),不起作用
- this SO question. 的所有答案均无效
- 按照open Carthage ticket 中的建议使用
env -i,但不起作用
解决方案
- 第一次构建时选择“通用 iOS 设备”。
- 将 SDK 参数直接传递给
xcodebuild、found in this answer. 这迫使您编写自己的carthage update,由 checkout 和 build 组成。只有此选项可用作 Xcode Build 预操作步骤。 The solution was tested.
一些链接
【问题讨论】: