Matt W. Matt W. - 1 month ago 6
iOS Question

Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate

So I'm not new to codesigning with Apple. I understand this is a novice part of app development, but I'm getting this error and I can't solve it. I understand that I create a private key through keychain access, use that private key to generate a certificate, use that certificate and an appID to generate a provisioning profile, and use an "App Store" profile to codesign for distribution. But I think I'm running into this error because of xcode 4.2. But this is what I've done to try and resolve this issue:

  1. Uninstalled xcode using uinstall-devtools --mode=all, then rebooted and reinstalled xcode 4.0.2.

  2. Removed and re-downloaded the certificate from the provision portal. (No invalid errors)

  3. Removed all profiles associated with the appID I'm working with and only re-downloaded the App Store Distribution profile.

  4. I made sure the I'm explicitly selecting the correct provisioning profile in the project and the target settings for release.

  5. I'm making sure that the release setting is selected for "Archiving" in the Scheme.

One thing that I can think of that might be the issue is I'm targeting iOS version 4.2, and the base sdk is 4.3.

But I've been through Apple's doc:

My issues started to happen after I installed xcode 4.2, and then went back to 4.0.2.

One other weird thing, is when I build for ad hoc I get the same warning, but the ad hoc build works. It just seems that I can't submit to the app store while ignoring the warning.

Answer Source

So after a long pain staking process I finally got xcode to code sign with out the warning. But before I tell you how I solved it, I'm going to tell you what I've done.

I cleared out all my public/private keys, cleared all certificates, uninstalled xcode 4.0.2, reinstalled xcode 4.2 (tried redoing certificates), uninstalled xcode 4.2, installed xcode 4.0.2 (tried redoing certificates), and after all that, still no luck.

Finally I deleted the WWDR certificate from my local machine and downloaded a new certificate from the provisioning portal, and YATZEE! After I redid the certificates and provisioning profile, it finally built without a warning!

So just so anyone has to go through this I've decided to post my answer. I hope I help someone...