Unable to resolve CodeSign failure

Been using Xcode for a while with C++ set to sign locally (and objC before that). All worked ok. Looking to learn swift. Created a new, blank MacOS project, which starts compiling the template project (no code added yet by me) and fails with error "Command CodeSign failed with a nonzero exit code". It's set to automatically manage signing. I have valid development certificates. I've read lots of forum articles etc but unable to resolve.

Error description "resource fork, Finder information, or similar detritus not allowed" but it's exclusively apple code at this stage so would not expect any non-compliant files to be involved.

Any suggestions as currently I've fallen at the first hurdle on my Swift journey?

Full codesign command line below:

Signing Identity: "Apple Development: Steve Proctor (XXXXXXX)"

/usr/bin/codesign --force --sign xxxxxx -o runtime --entitlements /Users/steve/Documents/dev/t1/Build/Intermediates.noindex/Previews/macos/t1/Intermediates.noindex/t1.build/Debug/t1.build/t1.app.xcent --timestamp\=none --generate-entitlement-der /Users/steve/Documents/dev/t1/Build/Intermediates.noindex/Previews/macos/t1/Products/Debug/t1.app

/***/t1.app resource fork, Finder information, or similar detritus not allowed Command CodeSign failed with a nonzero exit code

Answered by DTS Engineer in 794582022

This error kinda means what it says. The codesign command is failing because it’s encountered an extended attribute, or other stuff, within the app bundle that you’re trying to sign. I go into this in more detail in this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

This error kinda means what it says. The codesign command is failing because it’s encountered an extended attribute, or other stuff, within the app bundle that you’re trying to sign. I go into this in more detail in this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for the response. I'll work through the thread you've referenced. Given I'm compiling template code with zero additions or modifications by me, I'm assuming there's something about the setup on my machine that's causing the newly minted template files created by Xcode to trigger the one of the error conditions.

Accepted Answer
I'm assuming there's something about the setup on my machine that's causing the newly minted template files created by Xcode to trigger the one of the error conditions.

Right. I’m hoping that, once you track down the identity of this ‘detritus’, it’ll be clear where it’s coming from. For example, I vaguely recall seeing a problem like this where the developer had their build products on iCloud Drive, and iCloud Drive’s extended attributes were causing this issue.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks Quinn, you got it in one. Moving the project file to a directory not mapped to iCloud solved the problem. Steve.

Unable to resolve CodeSign failure
 
 
Q