How to solve "Application failed codesign verification" when uploading to iTunes Connect? How to solve "Application failed codesign verification" when uploading to iTunes Connect? xcode xcode

How to solve "Application failed codesign verification" when uploading to iTunes Connect?


I found the solution to this problem after deeply looking at the log file.

Although I created my own Distribution Profile and assigned to the CODE SIGNING IDENTITY the correct value for the developer certificate, it didn't work giving me an error: "Application failed codesign verification".

The problem is at the following line:

Authority=iPhone Developer: My Name (XXXXXXXXX)

Despite the correct selection in the project settings for the Distribution profile, XCode was compiling it with the developer certificate.

I finally solved it: Right click on the "Targets" -> Get info -> and there it was selected (don't ask me why) the wrong distribution certificate instead of the right one.

I corrected that and it finally was accepted.

Related links (you need a developer account): https://devforums.apple.com/message/147964


Excellent post. I too was having this trouble and after much headache realized that both the Project AND the Target should be checked for using the correct Code Signing Identity. Somehow Xcode was reverting back to the Developer Provisioning Profile instead of the Distribution Provisioning Profile. It even did so on a build right after I had deliberately selected the correct one!

I. To be safe, first do the following:

  1. Clean all builds.
  2. Delete contents of build folder in finder.
  3. Delete existing code signing identities from the project and target settings.
  4. Restart Xcode.

II. Then check the Project for the correct Provisioning Profile:

  1. Go to Project Settings > Build Tab > Code Signing Identity
  2. Select the appropriate Distribution Provisioning Profile

III. Now check the Target:

  1. Target > Get Info > Build Tab > Code Signing Identity
  2. Select the appropriate Distribution Provisioning Profile

IV. Cross fingers and hope you never see that blasted little yellow triangle again.


Cy took the right approach for solving this problem - When "Application failed codesign verification" is a build warning, expand that item in the build log and scan for the root cause of the failed signature verification.

In the case of Cy.'s original post you'll see that the root issue was "test-requirement: failed to satisfy code requirement(s)", and in my experience this is almost always caused by signing with the wrong certificate i.e. an iPhone Developer profile instead of iPhone Distribution.

The root cause is not always an obvious explanation, but should guide you at least with additional search terms or troubleshooting ideas.

For others experiencing the "Application failed codesign verification" during Xcode Archive Validation or Submission, look to the build log at Product > Archive time for a build warning by the same title and expand that for the root cause. Then take a look at Apple's complete list of potential causes of this error at the following URL "How do I resolve the error: Application failed codesign verification?"