xcode运行报错Command CodeSign failed with a nonzero exit code的解决方案

发布时间:2021-03-10作者:laosun阅读(866)

xcode运行报错Command

xcode运行C++项目,提示:Command CodeSign failed with a nonzero exit code的解决办法!

    第一次使用mac xcode编写C++程序,运行的时候提示错误。

    如下所示:

    Showing Recent Messages
    CodeSign ~/Library/Developer/Xcode/DerivedData/YiDing-fiptpxtujwvnricolywfszwdtqod/Build/Products/Debug-iphonesimulator/CTAssetsPickerController.bundle
        cd ~/Downloads/MVVM-RAC-Demo-master/YiDing/Pods
        export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
     
    Signing Identity:     "-"
     
        /usr/bin/codesign --force --sign - --timestamp=none ~/Library/Developer/Xcode/DerivedData/YiDing-fiptpxtujwvnricolywfszwdtqod/Build/Products/Debug-iphonesimulator/CTAssetsPickerController.bundle
     
    ~/Library/Developer/Xcode/DerivedData/YiDing-fiptpxtujwvnricolywfszwdtqod/Build/Products/Debug-iphonesimulator/CTAssetsPickerController.bundle: bundle format unrecognized, invalid, or unsuitable
    Command /usr/bin/codesign failed with exit code 1


    打开钥匙串,如下所示(我这是更新过后的):

    证书过期.png


    这是替换过的证书,如果你的证书也显示不受信任之类的,那么更新一下即可。

    下载地址:

    Apple Worldwide Developer Relations Certification Authority.cer.zip



0 +1

版权声明

 Mac  电脑  C++

 请文明留言

0 条评论