Xcode fails with "Code Signing" Error
CODE_SIGN_IDENTITY verification script.
Often in set ups that use version control the project.pbxproj
can be merged in such a way that two CODE_SIGN_IDENTITY
lines can be inserted. This seems to cause Xcode problems under certain situations (like command-line builds or archiving).
A tell-tail sign is lines similar to this in the project.pbxproj
file (right-click on the project and select "Show Package Contents…")
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";CODE_SIGN_IDENTITY = "iPhone Distribution";
Deleting one of these lines will let you select the correct value in Build Settings and the project should once again build correctly.
I have created simple script to help diagnose this issue it can be found here: https://github.com/rjstelling/Xcode-Project-Validate
I got this code sign error with an Open Source Github project which I only wanted on my own device (not in store or anything) and I don't have a paid membership account.
In that case it's meanwhile (since XCode 7) possible to configure and allow your app as unsigned but trusted.
It's all explained here: https://stackoverflow.com/a/4952845/828184
I had a similar problem which I could solve after a lot of wasted hours. So writing my solution here in case it helps someone.
My iOS app, which I have been developing and deploying/updating regularly for past 5 years, recently ran into a similar issue where final "Distribute App" via XCode Organizer started showing an error "Code Signing for MyAppName.app failed - see distribution logs for more information". The distribution logs have no information whatsoever.
After a lot of trial-and-error, I found that the certificate used for code signing had somehow gone corrupt. I deleted the certificate and it fixed the problem. Hope this helps someone.