Command /usr/bin/codesign failed with exit code 1

后端 未结 30 3367
执笔经年
执笔经年 2020-11-27 14:17

I have the following error:

Command /usr/bin/codesign failed with exit code 1

Here is what I already did for trying to fix this:

相关标签:
30条回答
  • 2020-11-27 14:33

    After hours of googling and trying out different things, this is what fixed it for me:

    1. Make sure there are no certificates in the System > Certificates tab on Keychain Access. Remove all duplicate certificates from there.

    2. Install the WWDR intermediate certificate under certificates from the provisioning portal, in addition to the developers certificates and make sure you see it in the Login > Certificates tab on Keychain Access.

    0 讨论(0)
  • 2020-11-27 14:34

    I had the exact same problem and this did the trick for me:

    Xcode > Preferences > Accounts > View Details > And just refresh the Provisioning Profile

    Seems like the accounts in Xcode were not updated with the latest provisioning profiles so a quick refresh sorted this out.

    0 讨论(0)
  • 2020-11-27 14:36

    For anyone with this problem in the future (who doesn't want to rebuild their project), an additional question to ask is whether you have a space in your product name. I'd recommend going through your properties (right-click -> get info) of your project and your target. For my project, the only place that a space was needed was in the plist for the bundle display name.

    0 讨论(0)
  • 2020-11-27 14:37

    For me, I just updated to Xcode 8, and converted my Swift 2.2 code to Swift 3 code, and I got errors in the Unit Testing and UI Testing. I just cleaned and then all the errors disappeared.

    0 讨论(0)
  • 2020-11-27 14:40

    I was fighting for about 2-3 hours to codesign a project with Parse API. It turned out that the embedded frameworks caused the problem. Make sure you set "Code sign on copy" (see picture). If does not work delete the Parse and Bolts frameworks from the list and remove them from your project then add them again.

    enter image description here

    0 讨论(0)
  • 2020-11-27 14:40

    Some of the answers above allude to the problem but don't clearly spell out the steps to correct it.

    Here is my attempt at after it has become super frustrating which seems to have worked for me so far :

    The problem is caused because there is duplicate certificates in your Apple Developer portal or potentially in your machine. I haven't had any negative consequences from doing this and its worked so far.

    1. Close Xcode!

    2. You have to remove the existing certs from your developer account visit : https://developer.apple.com/account/ios/certificate/development/ and select development account ( there should be multiple certs) I revoked each one by clicking on them and selecting revoke.

    2.remove certs from your keychain on your Mac

    • Open Keychain app by pressing clover+space and typing in keychaing
      and pressing enter
    • Search in the top right hand corner for "developer"
    • Select the potential duplicate keys and export/delete them so they aren't in the list.

    1. Lastly regenerate your certs in XCode and rebooot

      • Reopen xcode
      • regenerate a new cert by going to project -> General --> Signing
      • reselect your "Team Account"

    • a new cert should be generated
    • Reboot for good measure - and enjoy being free from this bug ( which Apple should really sort out, if it was at all possible to replicate easily)
    0 讨论(0)
提交回复
热议问题