In this post, I would demo how to solve the below error when trying to add firebase crashlytics to your ios app with swift in iOS developement:
When we add firebase crashlytics to our app, we followed the instructions from https://firebase.google.com/docs/crashlytics/get-started?platform=ios&authuser=0#add-sdk , which told us add a build script to our app’s run script：
We got this error from xcode
Command PhaseScriptExecution failed with a nonzero exit code
And this error:
3. The reason
What is a build phase in xcode?
This build phase also lets you provide a list of input and output files. The script always runs when no input and output files are provided. When input and output files are provided, the script only runs if it has never been run before, one of the input files has changed, or one of the output files is missing.
If you are using cocoapods, you may not be required to have an additional run script .
4. The solution
So the solution is remove the script as follows:
Now it works!
In this post, I demonstrated how to solve the Command PhaseScriptExecution failed with a nonzero exit code when using firebase crashlytics to our apps.