You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xcode 13.4.1构建提示target间依赖循环错误及修复

Xcode 13.4.1 构建依赖循环报错问题

问题详情

仅使用Xcode 13.4.1版本构建项目时会触发专属报错,其余版本无该异常,报错内容如下:

Cycle in dependencies between targets '#aTargetName' and '#anotherTargetName'; building could produce unreliable results. This usually can be resolved by moving the target's Headers build phase before Compile Sources.

报错含义:两个target间存在依赖循环,构建产物可能不可靠,官方给出的常规修复方向是将目标的Headers构建阶段移动到Compile Sources阶段之前。

临时规避方法

  • 每次运行项目前执行*清理构建文件夹(clean build folder)*操作,可临时绕过报错完成构建。
  • 出问题的项目当前构建阶段配置参考:
    项目构建阶段配置截图

2022年7月1日更新:永久修复方案

打开终端执行如下命令,执行后重启Xcode即可彻底解决该问题:

defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1

内容的提问来源于stack exchange,提问作者Luciano Perez

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.29 03:33:21