我正在尝试在我的iOS项目中安装Apollo。我在这里按照说明进行操作:https://www.apollographql.com/docs/ios/installation.html。当我完成“添加代码生成构建步骤”时,出现错误。它找不到文件check-and-run-apollo-cli.sh。错误是“命令PhaseScriptExecution失败,退出代码非零。”所以我检查了它给我的文件路径。似乎“ check-and-run-apollo-cli.sh”不存在,但“ check-and-run-apollo-codegen.sh”确实存在。因此,我将项目中脚本的最后一行更改为check-and-run-apollo-codegen.sh。但是,它仍然不起作用(再次出现“命令PhaseScriptExecution失败,退出代码非零”)。我需要做什么?谢谢。
我在[Apollo 0.20.0上使用Cocoapods
具有相同的错误
所以我使用了Apollo here提供的脚本>
并根据我的工作空间定制
"${PODS_ROOT}/Apollo/scripts/run-bundled-codegen.sh" codegen:generate --target=swift --includes=./**/*.graphql --localSchemaFile="schema.json" API.swift
为我工作= D