So you’re in XCode 4, you have your project ready for deployment, you have your app store distribution certificate installed into your keychain and your app store provisioning profile imported into XCode. You can successfully build with your developer certificate, and now you’re ready to build and sign with the App Store certificate. You’ve created an App Store configuration and specified your App Store certificate in the Code Signing section of your build settings, for that App Store Configuration. You’ve done everything right, to put it succinctly. You choose your device scheme and then Product -> Archive. It all goes swimmingly until you see this:
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
So then you look around on the internet, see all sorts of people with the same problem, with all sorts of crazy voodoo answers (and who can blame them).
It turns out the problem can be super simple. You want to get to the Run Options dialog – Option-Cmd-R. Choose Archive on the left side panel. Choose App Store as your Build Configuration (for me, it was still Release). Now you can just hit the Archive button, or just hit Done and Archive from the menu as normal. That’s it. XCode was just building with the developer certificate, even though it appeared you had the App Store specified.
8 Comments
Join the conversation and post a comment.



Useful tip!
I searched for a few hours for an solution and this simple one was it!
Indeed, anytime Apple updates Xcode new issues appear especially with code signing, and thousends of developers wonder what is going wrong.
Thank´s a lot for this useful tip.
Holy cow! I’ve been doing all kinds of “voodoo” for the past 2 days. You saved my iOS development career! I had no idea about this Option-Cmd-R option. How on earth are users suppose to reach this view without knowing the keyboard shortcut?
You saved my day…
how to solve it in xcode 3.2.6?
thanks
Xcode 3 is an entirely different kettle of fish :-)
I am using Xcode 4.2 and I have only Release and Debug as available build configurations. Any idea ?
You just have to create some new configurations. If you click on your project in the navigator area, and then on your project in the editor area, and finally on the Info tab, you can add new configurations there.