17

Every time I try to run my iOS app on Xcode 10, it fails and gives me the error "Command PhaseScriptExecution failed with a nonzero exit code"

The full error description is:

bash: /Users/Noah 1/Library/Developer/Xcode/DerivedData/WeatherSando-dszhaqymmhxfptfiymvnuvshlbtb/Build/Products/Debug-iphoneos/WeatherSando.app/Frameworks/AerisCore.framework/strip-frameworks.sh: No such file or directory Command PhaseScriptExecution failed with a nonzero exit code

I removed all AerisWeather CocoaPods from my project, what is wrong?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Noah Schmidt
  • 171
  • 1
  • 2
  • 6
  • It sounds as if your target still has a build phase that references the framework you removed. Look at the "Build Phases" section of your project settings. – Phillip Mills Jan 30 '19 at 21:58
  • 2
    That did it Phillip Mills, there was one sneaky framework reference in the Run Script section of Build Phases. Thanks. – Noah Schmidt Jan 30 '19 at 22:08
  • Try this if Phillip Mills solution didn't work for you. https://stackoverflow.com/a/55590727/8738937 – Shahriyar Apr 09 '19 at 11:05
  • Run Script on old projects will put you in a spin. Thanks Phillip, revisiting an old project with a Fabric run script. Check the below answer from @Robert Desler for more details. – Matthew Ferguson Apr 25 '21 at 05:55

5 Answers5

34

For me worked what @Phillip Mills suggested. Build phase references the framework which has been removed.

In my case I removed manually embedded framework which I replaced with CocoaPod dependency. I needed script which there was previouly no longer but I didn't remove it.


So, look to Build Phases for your target and remove Run script

enter image description here

Robert Dresler
  • 10,580
  • 2
  • 22
  • 40
  • 3
    If you are revisiting an old project you might want to spend a moment and check this solution. This was it for me. 3 year old project with Fabric run script. Thanks Robert. – Matthew Ferguson Apr 25 '21 at 05:53
6

In my case, I had wrong project folder name. Project folder name shouldn't include the space

Idrees Ashraf
  • 1,363
  • 21
  • 38
  • 2
    This is a highly underrated answer! That was (almost) exactly my problem! RN project was inside **grandparent folder** containing a space in folder name. I disregarded this answer since my project folder did not include spaces. x) This answer also helped: https://stackoverflow.com/a/67289307/12322350 Thank you both! – Lazar Jun 20 '22 at 15:29
0

For me it was upgrading Plaid from 1.0.0 to 3.0.0. They have a Build Phase to strip the iOS Simulator part from the framework. I had to remove that for it work. Details found here:

https://plaid.com/docs/link/ios/ios-v2-migration/

0

I have resolved this error by removing the spaces in the folder name, inside which this project was set up. After removing space, it worked

-2

Upgrade your flutter sdk to higher version and make sure that your android studio version is above 4.0

starball
  • 20,030
  • 7
  • 43
  • 238
Kanjah
  • 59
  • 10