Won't compile/build after a "Clean Build Folder..." invoked

I have 2 versions of my app. This version I issued the "Clean Build Folder..." command. After doing so it will no longer compile/build. I've restored the directory to a copy prior to the Clean Build Folder with same result. The other version of this code will build and execute.

Command SwiftCompile failed with a nonzero exit code

/Users/martinwoscek/develop/iOS_switft_DEVELOP/FullScreenCamera-master-no_drivemonitor/AV Foundation/Base.lproj/LaunchScreen.storyboard: Encountered an error communicating with IBAgent-iOS.


Showing Recent Issues

. . .

Command SwiftCompile failed with a nonzero exit code

Command SwiftCompile failed with a nonzero exit code

Build failed 2/11/25, 8:15 AM 1.4 seconds

Answered by DTS Engineer in 824676022

Thank you for sharing the post. Would it be possible to provide the entire output console instead of just the last error messages? Could you please provide us with some additional information about the project? Are there any third-party frameworks or projects involved? Was the project developed using Xcode? If so, was it created using Storyboard or SwiftUI?

It's strange that the 'Clean Build Folder' command caused this problem, and even restoring the directory to a previous state didn't resolve it. Let's try some troubleshooting steps:

  • Xcode Clean and Restart: Could you please try doing a full Xcode clean and then restart Xcode? Sometimes, a simple clean and restart can resolve these kinds of issues.
  • Derived Data Removal: Derived data can sometimes cause build problems. Then try building the project again.
  • Check Storyboard: Are you using Storyboards? There might be an issue with the LaunchScreen.storyboard. Could you please open it and see if there are any error messages or warnings in the Xcode interface? Also, try deleting the LaunchScreen.storyboard from the project and re-adding it.
  • IBAgent-iOS Crash: The error message mentions an issue with IBAgent-iOS. Sometimes, restarting your Mac can help resolve this.
  • Check for any recent changes: Have you made any recent changes to the project, especially related to the AV Foundation framework or the LaunchScreen?
  • Try on a different machine: If possible, could you try building the project on a different machine? This will help us determine if the issue is specific to your development environment.

Since the other version of the code builds fine, it's likely that there's a specific change or configuration in this version that's causing the problem. Please let me know which of these steps work, or if you notice any other differences between the two versions of the code.

Albert Pascual
  Worldwide Developer Relations.

Accepted Answer

Thank you for sharing the post. Would it be possible to provide the entire output console instead of just the last error messages? Could you please provide us with some additional information about the project? Are there any third-party frameworks or projects involved? Was the project developed using Xcode? If so, was it created using Storyboard or SwiftUI?

It's strange that the 'Clean Build Folder' command caused this problem, and even restoring the directory to a previous state didn't resolve it. Let's try some troubleshooting steps:

  • Xcode Clean and Restart: Could you please try doing a full Xcode clean and then restart Xcode? Sometimes, a simple clean and restart can resolve these kinds of issues.
  • Derived Data Removal: Derived data can sometimes cause build problems. Then try building the project again.
  • Check Storyboard: Are you using Storyboards? There might be an issue with the LaunchScreen.storyboard. Could you please open it and see if there are any error messages or warnings in the Xcode interface? Also, try deleting the LaunchScreen.storyboard from the project and re-adding it.
  • IBAgent-iOS Crash: The error message mentions an issue with IBAgent-iOS. Sometimes, restarting your Mac can help resolve this.
  • Check for any recent changes: Have you made any recent changes to the project, especially related to the AV Foundation framework or the LaunchScreen?
  • Try on a different machine: If possible, could you try building the project on a different machine? This will help us determine if the issue is specific to your development environment.

Since the other version of the code builds fine, it's likely that there's a specific change or configuration in this version that's causing the problem. Please let me know which of these steps work, or if you notice any other differences between the two versions of the code.

Albert Pascual
  Worldwide Developer Relations.

Thanks for the quick response. I did try some of you mentioned, but right after posting I noticed that my Xcode is at 15.2 (~1 year old). -Who checks versions when everything is automated...?

Steps I just completed:

  1. check the App Store, Sure enuf its at 16.2, but that version is not in my "update" list in the App Store.
  2. checked the MAC OS and applied the latest update to Ventura 13.7.4.
  3. After boot to updated MACOS, still can't update Xcode from the App Store....So I do the manual download from Apple of the .zip file and I get the :

"You can’t use this version of the application “Xcode.app” with this version of macOS."

So that also explains when I can't update to IOS 18.3.1 to support my iPhone development.

Which Im not sure why my other projects still build and run on my iPhone...but haven't cleared the build dir's of those projects.

So it looks like I have a reason to buy a new MAC or is there another workaround?

My dev env is back. I performed the following to get things operational (until I upgrade the MacPro: 1 uninstalled Xcode 2 manually delete everything in ./Library/Developer 3. Download Xcode 15.1 and CLT for Xcode 15.1 4. Reboot the MAC 5. Install Xcode 15.1 and CLT for Xcode 15.1

Do the verifications: $ xcode-select -p /Applications/Xcode.app/Contents/Developer

$ pkgutil --pkg-info $(pkgutil --pkgs | grep CLTools | head -n 1) package-id: com.apple.pkg.CLTools_SDK_macOS13 version: 15.1.0.0.1.1700200546 volume: / location: / install-time: 1739554570 $ date -j -r 1739554570 Fri Feb 14 12:36:10 EST 2025

Very happy you are back on writing code after updating your Xcode version!

Albert Pascual
  Worldwide Developer Relations.

Won't compile/build after a "Clean Build Folder..." invoked
 
 
Q