I've been browsing Stack for hours in an attempt to try and fix this error, and I've tried everything I can find/think of. I'm submitting an update to an existing app to the App Store, and upon submitting my build, I keep receiving this error:
Invalid signature. Code object is not signed at all. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level. Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a simulator target.
My app is undoubtedly signed with a distribution certificate, the correct provisioning profile is installed and selected, the profile contains the correct certificate, I've deleted the profile and created a new one in attempt to fix the error, I've reinstalled certificates, restarted Xcode... cleaned the project multiple times, even restarted my system; I'm stumped.
Also: When I do attempt to export the build, even though I've selected to use my provisioning profile and it appears to build with my selected profile, it says it's using "XC [Name of my Profile Here]" provisioning profile. When I check the portal, there's now the profile I created, and a separate profile with the same title with the XC in front of it. Even once I delete this profile on the developer portal, it's recreated? Could this be causing the submission error? Please help.
Now-a-days Xcode has a "Show Log" button.
Tap that and it'll shine some light on the offending framework / script.
In my case, I sometimes forget to remove some debugging Frameworks before making my production build.