Error with codesign when building for Mac: "resource fork, Finder information, or similar detritus not allowed"

Hello fellows,
I am following a beginner tutorial on how to compile your first class in UE; I created a blank C++ project in the editor, added a C++ class and copied the code as in the tutorial
(Quick Start Guide to Player-Controlled Cameras in Unreal Engine CPP | Unreal Engine 5.5 Documentation | Epic Developer Community)
Whether if I build the code from XCode or launch on Mac platform directly from UE editor, the compiling fails with the error

Signing Identity:     "Sign to Run Locally"
    
/usr/bin/codesign [....]
/Users/luciano/Documents/Unreal Projects/HowTo_PlayerCamera/Binaries/Mac/HowTo_PlayerCamera.app: replacing existing signature
/Users/luciano/Documents/Unreal **Projects/HowTo_PlayerCamera/Binaries/Mac/HowTo_PlayerCamera.app: resource fork, Finder information, or similar detritus not allowed**

I’m on UE 5.5, MacOS Sequoia 15.1, Xcode 16.1. I tried all the solutions I could find (all of them for older versions of… all) with no luck.

Any idea?
Cheers
Luciano

Did you ever fix this?

For others that come to this post looking for an answer, the fix is moving the project off iCloud drive. i.e don’t have them in a folder that is getting stored on iCloud (like the Documents folder). It seems the “detritus” is metadata iCloud keeps adding to the files as it syncs them. Given this is part of Apple’s ecosystem I’m surprised this is broken in XCode :person_shrugging:.

1 Like

Thanks a lot

For me, removing the directory from iCloud was not enough. I did more research and found this post that gives a detailed explanation of how to remove it completely:

I got a few “Permission denied” errors running the command, so I ran it again with sudo and it was fixed:

sudo xattr -cr <directory>

PS: :warning::double_exclamation_mark: Be extremely cautious with this command! You might corrupt your system if you don’t do it right, and you might even end up having to reinstall macOS! And it will happen without warning or notice! :double_exclamation_mark::warning: