问题
I'm trying to submit my iOS app to the App Store, I have followed the necessary steps found here, https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933, archived, validated and submitted it to Apple whiteout any errors. The issue appears when I try to build my application for my iPhod touch where I get the following warning:
Application failed codesign verification. The signature was invalid, or it was not
signed with an iPhone Distribution Certificate. (-19011)
[...]
test-requirement: code failed to satisfy specified code requirement(s)
codesign_wrapper-0.7.10: failed to execute codesign(1)
- (null)
The app runs fine on the device, but xCode keeps showing me this warning.
My build settings looks like this (both on target and project):
Quite annoying. Any tips on how to solve this?
Update: I'm pretty sure that I found the cause of the problem. I tested it on another machine and no warning showed up. I then compared my keys and certificates on both machines, removed duplicates on my first machine. But it still didn't work. Om my second machine (where I didn't got any warnings) I found an "Unkown" certificate, so I deleted it (I had previously deleted it on my first machine as well). But now I get the warning on that machine as well. Does anybody know if it's possible to get this certificate back somehow?
回答1:
You need to get the distribution certificate and set the Code Signing parameters to distribution profile in the 'Build Settings'.
Click on your project in the top of the left pane, then choose the target, open the 'Build Settings' tab. Find 'Code Signing' group and the Distribution branch. Set everything to your Distribution profile. This is were to look for the solution of your problem. You might want to play with these settings if it won't work right away.
If you do not have the Distribution Certificate you need to get it at the iOS Provisioning Portal.
回答2:
I "solved" it by reinstalling Lion. I'm almost sure that it was the deletion of the "unknown" certificate that caused the warning. Because, now it's back and I don't get any warnings. It might also be possible to use some kind of 3rd-party data recovery software to get that certificate back.
回答3:
Check your certificates for both release and debug builds -- probably one of them has an old or invalid distribution certificate.
来源:https://stackoverflow.com/questions/7945481/annoying-code-signing-error-warning-in-xcode-4-2