Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code

前端 未结 25 823
醉梦人生
醉梦人生 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:59

    Probably you should do as follow:

    • Remove .xcworkspace and Pod folder
    • Run pod install
    • Delete derived data
    • Clean all project (press alt before click on click)

    I tried above things and it worked for me.

    0 讨论(0)
  • 2020-11-28 09:00

    In my case was that I changed a line in a script of my Xcode project and that line was badly written (I forgot to add ";" at the end of the line). So I added the ";" and clean and build project.

    0 讨论(0)
  • 2020-11-28 09:02

    Restart worked for me... Mac OS restart, not xCode restart...

    0 讨论(0)
  • 2020-11-28 09:02

    I was facing this issue because of Firebase Crashlytics. In Targets -> Build Phases -> Run Script

    I had Firebase Crashlytics written like

    ${PODS_ROOT}/FirebaseCrashlytics/run
    

    I changed that and put it in double quotes

    "${PODS_ROOT}/FirebaseCrashlytics/run"
    
    0 讨论(0)
  • 2020-11-28 09:03

    For me, the issue was with the node version that xcode was using. My project was building fine in Expo but not in Xcode after ejecting. I found my answer here: https://github.com/expo/expo/issues/8488

    • check you have the latest version of node

      $ node --version

    • delete the version in /usr/local/bin/

      $ rm /usr/local/bin/node

    • re add a sym link

      $ ln -s $(which node) /usr/local/bin/node

    0 讨论(0)
  • 2020-11-28 09:03

    I had the same problem in Xcode 11.5 after revoking a certificate through Apple's developer homepage and adding it again (even though it looked different afterwards):

    Every time I tried to archive my app, it would fail at the very end (not the pods but my actual app) with the same PhaseScriptExecution failed with a nonzero exit code error message. There is/was a valid team with an "Apple Development" signing certificate in "Signing & Capabilities" (project file in Xcode) and locking & unlocking the keychain, cleaning & building the project, restarting,... didn't work.

    The problem was caused by having two active certificates of the same type that I must have added on accident, in addition to the renewed one. I deleted both the renewed one and the duplicate and it worked again.

    You can find your certificates here or find the page like this:

    • https://developer.apple.com/
    • "Account" (at the top)
    • Log in
    • "Certificates, IDs & Profiles" (on the left)

    Also check that there aren't any duplicates in your keychain! Be careful though - don't delete or add anything unless you know what you're doing, otherwise you might create a huge mess!

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