Cycle inside AppName with Xcode 13.3 when building App

Version: Xcode 13.3 / Xcode 13.3.1

Every time I make some changes in the code the first build fails with the error shown below. When I build again the error is gone.

All research points to I have to move the 'Headers' before 'Compile Sources' in the building phase of the target. But I do not have 'Headers'. I also don't use CocoaPods but SPM. All Scripts are performed before 'Compile Sources'.

With Xcode 13.2.1 it seem to work normally.

Does anyone know what is going on and how to fix it?

Showing Recent Messages

Cycle inside AppName; building could produce unreliable results.

Cycle details:

→ Target 'AppName' has link command with output 'path_to_app'

→ Target 'AppName': SwiftDriver Compilation AppName normal arm64 com.apple.xcode.tools.swift.compiler
Answered by we7ee in 714144022

The problem was indeed the EnableSwiftBuildSystemIntegration.

Setting it to 0 was not working, though. I got a response from an engineer through feedback assistant. Completely removing the key fixed this issue.

This worked for me:

  • defaults delete com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration
  • restart Xcode

Try defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 0 to disable the new build system on 13.3.

Accepted Answer

The problem was indeed the EnableSwiftBuildSystemIntegration.

Setting it to 0 was not working, though. I got a response from an engineer through feedback assistant. Completely removing the key fixed this issue.

This worked for me:

  • defaults delete com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration
  • restart Xcode
Cycle inside AppName with Xcode 13.3 when building App
 
 
Q