gpt4 book ai didi

ios - 从 Xcode 10 Build pre-action 运行时 Carthage 无法启动

转载 作者:可可西里 更新时间:2023-11-01 03:09:46 24 4
gpt4 key购买 nike

我有一个简单的 ksh 脚本可以运行carthage update --platform iOS 作为构建预操作,在更新到 Xcode 10 后开始失败。在终端运行命令成功生成Carthage文件夹。

要重现此问题,请退出 Xcode 并删除 DerivedDataCarthage 文件夹。然后打开 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 参数直接传递给 xcodebuildfound in this answer.这迫使您编写自己的 carthage update,由 checkout 和 build 组成。只有此选项可用作 Xcode 构建前操作步骤。 The solution was tested.

一些链接

Non answered thread on Apples forums.

Closed Alamofire ticket

最佳答案

对我来说有效解决方案是在执行迦太基更新之前取消设置来自 XCode 10 的环境变量之一:

取消设置 LLVM_TARGET_TRIPLE_SUFFIX

迦太基更新

关于ios - 从 Xcode 10 Build pre-action 运行时 Carthage 无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52987843/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com