Apple pains – Invalid signing certificate

I’ve been trying for the past two days to submit a new version of CashBase but I kept getting the dreaded “application failed codesign verification. the signature was invalid, or it was not signed with an apple submission certificate. (-19011) ” error. (Note: after migrating to XCode 4, all sorts of weird things happen, talk about a buggy piece of software, right there)

I tried all the tricks in the book: revoke the distribution certificate and re-create it, clean, made sure that the Code Signing for distribution is the correct one, etc. Nothing!

After many failed trials, I thought of taking a look at the entitlements used to sign the binary:

codesign -dvvv

I noticed that the Authority key was using my iPhone Development certificate. Turns out that the Archive Scheme in XCode 4 decided to switch all by itself to the Release Build configuration instead of the Distribution. Changing it back to Distribution solved my problem

With hindsight, I should have noticed that the binary was being compiled to the Release-iphoneos instead of the Distribution-iphoneos folder.

Note: A collection of helpful hints for this error can be found here

Edit: To edit the scheme, go to Product -> Edit Scheme. Select the Archive Scheme and make sure that the Build Configuration is set to Distribution (this is for XCode 4.x)


  1. Hey ,

    I’m very new to Xcode and i’m having the same problem! Can you try to explain more in detailed what you did, i mean were you changed more exactly !

    Thank you

    • Hey Remus,

      I’ve updated my post with more details. I hope this helps you, but make sure to take a look at the link I mentioned in the post as well, there’s a good collection of helpful hints there as well.

Leave a Reply

Your email address will not be published. Required fields are marked *