Application failed codesign verification. What do I do?

前端 未结 13 1288
庸人自扰
庸人自扰 2020-12-04 01:05

Xcode gives me this warning when I build the app for release.

Application failed codesign verification. The signature was invalid, or it was not signe

相关标签:
13条回答
  • 2020-12-04 01:21

    In the build log provided in the -UPDATE- section of the original post the root cause of the failed signature verification is expressed with the text: "test-requirement: code failed to satisfy specified code requirement(s)". That particular flavor of failed signature verification is almost always caused by mistakenly signing your app with an iPhone Developer profile instead of an iPhone Distribution profile.

    It can be confirmed with the steps in "How do I verify the certificate that was used to sign my app?". If the certificate "Identity" is "iPhone Developer: YOUR_NAME" instead of "iPhone Distribution: ..." that is the reason for the "Application failed codesign verification" error, and you can resolve it by performing the following steps:

    1a). if you have not yet created an App Store Distribution Provisioning Profile yet, that is done on the "Distribution" tab of the "Provisioning" Section of the iOS Portal site.

    Note, the "Distribution" tab is only available to Team Members whose role is either "Agent" (the one who signed up for the iOS Developer Program), or "Admin" (those that the Agent grant access to app-distribution capabilities).

    1b). if you're fairly certain you have an App Store Distribution Provisioning Profile installed in your Xcode profile library, you can verify it is an App Store profile as well as the App ID associated to it by using the steps in section How do I confirm my Provisioning Profile is for App Store distribution?

    2). verify that your Scheme 'Archive' task is mapped to "Release" using the steps in section: "Creating an Application Archive"

    3). check that you have an your App Store provisioning profile assigned to your "Release" Code Signing Identity using the steps in section "Assigning Provisioning Profiles to Build Configurations".

    Note: it's important to make these changes at the Target level Build Settings, versus the Project level ones, as Target settings override Project ones...you can think of the Project level build settings as 'defaults' to populate target settings (and any future targets) with. Also, Ensure the "All" button is depressed in the upper-left corner of Target Build Settings to reveal the "Code Signing Identity" section.

    4). retry your Product > Archive.

    If the issue persists after the above, I recommend continuing onto Apple's complete list of potential causes of this error at the following URL "How do I resolve the error: Application failed codesign verification?"

    0 讨论(0)
  • 2020-12-04 01:23

    Note: you may have to go to XCode's "Project" and select "Edit Active Target (appname)", which is near the bottom of the list ... in the new pane that opens, select "Build", then under "Code Signing Identity" select your distribution provision. Note that this seems to be editing a different thing than "Project" / "Edit Project" (editing "target" instead of "project"). I found I had to edit both project and target's code signing identities.

    0 讨论(0)
  • 2020-12-04 01:28

    You probably need to check what code signing profile is selected in your distribution build properties.

    0 讨论(0)
  • 2020-12-04 01:29

    I had exactly the same problem. It was due to installing Xcode 4.0.2 and 4.2 preview 3 at the same time. Removed both (through the provided uninstall scripts):

    <Xcodedir>/Library/uninstall-devtools --mode=all
    

    Then rebooted and installed 4.0.2 and it works :/

    0 讨论(0)
  • 2020-12-04 01:30

    I solved this by deleting the Archive that's not validating from the Organizer, closed and reopened Xcode and built for Archiving again.

    I then chose Archive from the drop down menu. After doing that my app passed validation.

    Hope that helps.

    0 讨论(0)
  • 2020-12-04 01:33

    You probably created a new certificate without refreshing the provisioning profiles

    0 讨论(0)
提交回复
热议问题