Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate
<p>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:</p>

<ol>
<li>Uninstalled xcode using uinstall-devtools --mode=all, then rebooted and reinstalled xcode 4.0.2.</li>
<li>Removed and re-downloaded the certificate from the provision portal. (No invalid errors)</li>
<li>Removed all profiles associated with the appID I'm working with and only re-downloaded the App Store Distribution profile.</li>
<li>I made sure the I'm explicitly selecting the correct provisioning profile in the project and the target settings for release.</li>
<li>I'm making sure that the release setting is selected for "Archiving" in the Scheme.</li>
</ol>

<p>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.</p>

<p>But I've been through Apple's doc: <a href="http://developer.apple.com/library/ios/#technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933" rel="nofollow">http://developer.apple.com/library/ios/#technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933</a></p>

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

<p>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.</p>

<p>Thanks for the help!</p>
