2

I am trying to install Apollo in my iOS Project. I follow the instructions here: https://www.apollographql.com/docs/ios/installation.html. When I complete the "Adding a Code Generation Build Step," I get an error. It cannot find the file check-and-run-apollo-cli.sh. The error is "Command PhaseScriptExecution failed with a nonzero exit code." So I checked the file path it was giving me. It seems that "check-and-run-apollo-cli.sh" doesn't exist, but "check-and-run-apollo-codegen.sh" does. So I changed the last line of the script in my project to check-and-run-apollo-codegen.sh. However, it still does not work ("Command PhaseScriptExecution failed with a nonzero exit code" again). What do I need to do? Thanks.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Everett
  • 387
  • 1
  • 4
  • 17

1 Answers1

1

I have the same error here on Apollo 0.20.0 using Cocoapods

So I use the script provided by Apollo here

And customized to my workspace

"${PODS_ROOT}/Apollo/scripts/run-bundled-codegen.sh" codegen:generate --target=swift --includes=./**/*.graphql --localSchemaFile="schema.json" API.swift

Worked for me =D

fabriciomasiero
  • 135
  • 1
  • 7