【问题标题】:Test Target not compiling on XCode 13测试目标未在 XCode 13 上编译
【发布时间】:2022-01-01 09:21:55
【问题描述】:

我们正在尝试将我们的代码从 XCode 12 迁移到 13。我们的代码和所有依赖项都在 XCode 12 上编译。

但是,由于我们迁移到 XCode 13,我们的单元测试目标没有编译。我们正在使用以下内容:

XCode 13.1
Mac OS 11.6
Carthage for dependency management.
Fastlane to execute tests.

应用、UI 测试和另一个测试套件正在成功编译。测试编译在一定数量的文件后似乎卡住了,当我们停止编译时,它会抛出以下错误

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'AppNameTests' from project 'AppName')

Command CompileSwiftSources failed with a nonzero exit code

我们尝试了以下方法:

iOS Deployment Target -> 12
Other Linker flags -> -ObjC
Delete Carthage-cache and rebuild Carthage

似乎没有任何效果。任何帮助表示赞赏。

【问题讨论】:

    标签: swift x86-64 carthage ios15 xcode13


    【解决方案1】:

    您是否将您的xcode-select 设置为 Xcode 13?

    xcode-select -s /Applications/Xcode\ 13.1.app/
    

    对我来说:

    $ xcode-select --print-path
    /Applications/Xcode 13.1.app/Contents/Developer
    

    【讨论】:

    • 嘿...我只安装了一个 XCode v13.1。我们在 12.3 上运行的 CircleCI 管道正在成功编译。我还有其他项目正在成功编译。 xcode-select --print-path /Applications/Xcode.app/Contents/Developer
    • 这听起来可能很傻,但似乎重启电脑帮助了很多人github.com/facebook/react-native/issues/…
    猜你喜欢
    • 1970-01-01
    • 2022-07-08
    • 2013-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-01
    • 2021-11-29
    相关资源
    最近更新 更多