Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code

After trying all the solutions, I was missing is to enable this option in:

Targets -> Build Phases -> Embedded pods frameworks

In newer versions it may be listed as:

Targets -> Build Phases -> Bundle React Native code and images

  • Run script only when installing

Build Phases


Go to

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

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


Run the following commands from the ios directory:

  1. pod deintegrate
  2. pod install
  3. XCode Clean build

Or, One-Liner:

pod deintegrate; pod install


Xcode -> File -> Workspace Setting -> change Build System to Legacy Build System.

Note - Its not the ideal solution.


For me, I was removing Crashlytics, Fabric and FirebaseCrashlytics. So there was a script (Run Script) for Fabric. So since app was running that first and I had removed the framework already, I was getting this error. So I removed the Run Script tab for Fabrics and then it worked perfectly fine.


Xcode 12.2 solution: Go to:

  1. Build settings -> Excluded Architectures
  2. Delete "arm64"

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"