0

I maintain a pretty old Objective C, iOS app. After switching to Xcode 8 + Sierra, I started getting a CodeSign error:

XXXXX.app: resource fork, Finder information, or similar detritus not allowed Command /usr/bin/codesign failed with exit code 1

I've been through the docs and also other questions here and I'm aware of the xattr -rc . solution. I've also tried finding individual files with attributes using ls -alR@. There are no more files with the com.apple.FinderInfo attribute, plus xattr -rc . would have cleared them anyway.

I set up a VM with El Capitan and Xcode 8 and I can build and sign there no problem, so somehow this is Sierra specific.

What I've tried:

  1. ls -alR@, xattr -rc ., et all.
  2. Rebooting
  3. Deep clean + kill DerivedData
  4. Made sure code is not in iCloud Drive

The same Xcode is able to build and sign a newer Swift app I'm working on.

How can I find which of the error cases applies to me? is it a "resource fork", "Finder information", or "similar detritus"?

0x6A75616E
  • 4,696
  • 2
  • 33
  • 57
  • Possible duplicate of [resource fork, Finder information, or similar detritus not allowed - Code Sign Error in macOS Sierra Xcode 8](https://stackoverflow.com/questions/39652867/resource-fork-finder-information-or-similar-detritus-not-allowed-code-sign-e) – Guru Jun 23 '17 at 16:51

1 Answers1

0
  1. Run find . -type f -name '*.png' -exec xattr -c {} \; on the root folder of your project
  2. Go to Finder, press cmd+shift+g, navigate to ~/Library/Developer/Xcode/DerivedData/, and delete all the folders there.
  3. In Xcode, press cmd+shift+k to clean your project.

You should be good to rebuild and run your app again.

This problem is usually caused by image files previously edited using Adobe Photoshop.

Roger Oba
  • 1,292
  • 14
  • 28
  • Thanks, but it didn't work. I just tried this exactly. Technically what I had already done is equivalent as well. `xattr -rc` removes attributes from every file, not just pngs. – 0x6A75616E Oct 06 '16 at 17:13
  • Be sure to try other image extensions that you may have in your project as well. In my case, some .tif files were causing this problem. – mim.ms Dec 04 '17 at 19:34