Search Unity

Question I'm getting CodeSign failed with a nonzero exit code in Xcode

Discussion in 'macOS' started by CasaNu, Apr 29, 2023.

  1. CasaNu

    CasaNu

    Joined:
    Dec 21, 2021
    Posts:
    15
    Recently I have been trying to build from unity to xcode but I'm getting an error that says:
    CodeSign /Users/me/Library/Developer/Xcode/DerivedData/Unity-iPhone-gifvmvezvyibexfkqrxjrdldcprz/Build/Products/ReleaseForRunning-iphoneos/ProductName.app (in target: Unity-iPhone)
    cd /Users/me/Desktop/Galaxian
    export CODESIGN_ALLOCATE=/Volumes/SSD/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    Signing Identity: "iPhone Developer: name.name@outlook.com (V758H4MV3R)"
    Provisioning Profile: "iOS Team Provisioning Profile: com.CasaProductions.Galaxian"
    (89caa867-c147-488a-94e0-21ed5b3e3bf3)

    /usr/bin/codesign --force --sign 0A39E731CA77AF6FF768015D4906543C27013E39 --entitlements /Users/me/Library/Developer/Xcode/DerivedData/Unity-iPhone-gifvmvezvyibexfkqrxjrdldcprz/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/ProductName.app.xcent --timestamp=none /Users/me/Library/Developer/Xcode/DerivedData/Unity-iPhone-gifvmvezvyibexfkqrxjrdldcprz/Build/Products/ReleaseForRunning-iphoneos/ProductName.app

    Warning: unable to build chain to self-signed root for signer "iPhone Developer: name.name@outlook.com (V758H4MV3R)"

    /Users/me/Library/Developer/Xcode/DerivedData/Unity-iPhone-gifvmvezvyibexfkqrxjrdldcprz/Build/Products/ReleaseForRunning-iphoneos/ProductName.app: errSecInternalComponent

    Command CodeSign failed with a nonzero exit code

    I have tried deleting keys in Keychain Access, restarting my computer, re-downloading Xcode, and re-building from unity. Any help is appreciated. Thanks.
     
  2. troach06

    troach06

    Joined:
    Jan 19, 2015
    Posts:
    14
    I'm getting this exact same issue. Please let me know once you fix it what you did. XCode 14 is definitely the culprit as it didn't happen in XCode 13. And you can't even install 13 as it isn't compatible with Ventura. Leave it to Apple to ruin Unity builds lol.
     
  3. Ubrano

    Ubrano

    Joined:
    Jul 23, 2017
    Posts:
    16
  4. marconymonteiro

    marconymonteiro

    Joined:
    Jan 14, 2022
    Posts:
    5
    Had the same issue when installed the XCode 14. Seems that the issue is related to access your Apple Developer Certificate. Solved by deleting my previous Certificate and creating a new one.