Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code

前端 未结 25 825
醉梦人生
醉梦人生 2020-11-28 08:20
Showing Recent Messages:-1: mkdir -p /Users/spritzindia/Library/Developer/Xcode/DerivedData/Contigo-atftiouzrdopcmcpprphpilawwzm/Build/Products/Debug-iphonesimulator         


        
相关标签:
25条回答
  • 2020-11-28 08:55

    Go to

    1. Keychain Access -> Right-click on login -> Lock & unlock again

    2. Xcode -> Clean Xcode project ->Make build again

    0 讨论(0)
  • 2020-11-28 08:56

    In my case the error was caused by the lack of space on my machine. Deleting old builds fixed the problem.

    0 讨论(0)
  • 2020-11-28 08:59

    try this step if you need: Xcode 11.5 1- open terminal: cd Path_project 2- cd pod clean 3- pod install

    if nothing change make this step

    1- open Build Phases for target -> [CP] Embed Pods FrameWork check this field

    0 讨论(0)
  • 2020-11-28 08:59

    By mistake I had uninstalled carthage from my system. Adding that fixed the issue for me.

    Step 1: Download & install latest carthage DMG here: Carthage

    Step 2:

    carthage update --platform iOS --cache-builds
    

    Step 3: Run project & enjoy. :)

    0 讨论(0)
  • 2020-11-28 08:59

    Another reason for the error might be is that Xcode is running a script during the run phase.

    If this is the case, you have 2 options:

    1. Delete the script (makes sense if the script is NOT important)

    2. Modify/update the scripts location path (Xcode might not be able to locate the script)

    In my case, the script was important, so I modified/updated its location.

    Originally, the script location path was written like this:

    $SRCROOT/scripts/clean-assets.sh
    

    Because the scripts path contained spaces (I moved the project to a new directory), I changed the path to this:

    "$SRCROOT"/scripts/clean-assets.sh
    

    By adding quotes to SRCROOT, changing it to "$SRCROOT", the error will go away.

    0 讨论(0)
  • 2020-11-28 08:59

    I had a similar error

    /{path to project root}/Pods/Target Support Files/Pods-{project name}/Pods-{project name}-frameworks.sh: Permission denied
    Command PhaseScriptExecution failed with a nonzero exit code
    

    In my case I had received a zip of a repo that included the Pods folder. It turns out that at some point between it being originally created and sent to me, the *.sh files in Pods/Target Support Files/Pods-{PROJECT}/ had all lost their execute permissions. Giving those files +x was the solution

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