I\'ve got a serious problem on Xcode 8 on macOS Sierra. when I try to build my app, I get the following issue.
CodeSign /Users/me/Library/Developer/Xcode/Der
I want to show my answer because it may be of interest (I have wasted a lot of time with this error)
None of the previous answers (which have a high score) have been useful to me.
They may be correct, but they haven't solved my problem.
Origin:
I added a new Target to my iOS application: iMessage
When I added png images to the Assets. xcassets, the error occurred.
Solution:
Make a copy of png images with "Apple Preview App" and uncheck Alpha.
Error message disappears.
For me worked this:
cd ~/Library/Developer/Xcode/DerivedData
xattr -dr com.apple.FinderInfo *
And then rebuild
This gets caused by some resource files having extra attributes on the file system, probably caused by macOS Sierra (as I started having it after upgrading to macOS Sierra).
Try executing xattr -c *
on the whole DerivedData
folder (as stated by the answer in https://forums.developer.apple.com/message/178039#178039):
cd ~/Library/Developer/Xcode/DerivedData
xattr -c *
Removing attributes only on the build folder fixed the issue for me when debugging. Removing attributes on the whole DerivedData
folder fixed it for me in archiving too. Please note that it may cause other consequences (albeit highly unlikely), but you can always delete the DerivedData
folder and it will be regenerated, in case anything gets broken.
Also, if it still fails, cleaning the project (not the build folder) after executing the command is a good idea.
Sometimes even if you fixed and/or had correct code-signing done, the problem might lurk in 3rd-party packages.
If you closely check out your build error, you might find the name of the 3rd-party libraries on the error message.
In this case, you must build your 3rd-party libraries again. For example in my case, update it via carthage update
and now the build succeeded properly.
Solution 1:
You can try file specific bash command like Mark McCorkle answered.
In terminal, goto project's root directory and execute one by one command
find . -type f -name '*.jpeg' -exec xattr -c {} \;
find . -type f -name '*.png' -exec xattr -c {} \;
find . -type f -name '*.tif' -exec xattr -c {} \;
Clean Xcode and Re Build. Done.
Solution 2:
You can fix this problem by finding files which holds finder information.
In terminal, goto project root directory and execute
ls -alR@ . > kundapura.txt
This creates kundapura.txt in current directory. Now search for com.apple.FinderInfo and clear this attributes for all files. You can do it like this
xattr -c <filename>
Example: xattr -c guru.png
Once you clear all then you are able to code sign. Cheers
in my case issue was with Provisioning Profiles and Account, i fixed by doing these steps: