Search code examples
iphoneiosxcodexcode4

Annoying Code Signing Error/Warning in Xcode 4.2


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):

enter image description here

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?


Solution

  • 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.