I’m facing an issue while archiving a macOS app in Xcode. The app runs fine in Debug. I have successfully archived this same project before. No major structural changes were made recently. The error appears only when trying to Archive. Running / building normally still works. When I try to archive, Xcode fails with the following generic error:

Command SwiftCompile failed with a nonzero exit code

This is a Swift / SwiftUI macOS application, and the issue appears to be specific to the Archive action, which uses the Release build configuration. Cleaning the build folder, deleting Derived Data, restarting Xcode, and rebuilding the project did not resolve the problem. I am using xcode version 26

Here is the screenshot :-

enter image description here

Zaid's user avatar

5

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.